From d952d5be57c0b60046f7d47b0835976e0b3d1f3f Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Sat, 25 Jan 2020 23:50:17 +0900 Subject: [PATCH] Add highlight-mark stub --- emacs.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/emacs.el b/emacs.el index 1b77527..f8125a5 100644 --- a/emacs.el +++ b/emacs.el @@ -2903,6 +2903,19 @@ Any output will be written to current buffer." ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; highlight-mark +(defvar-local highlight-mark-last-mark-position nil + "Last mark object.") + +(defun highlight-mark-post-command () + "Update highlight mark on mark change." + (unless (eq (mark t) + highlight-mark-last-mark-position) + (setq highlight-mark-last-mark-position (mark t)) + (message "Mark changed! %S" + highlight-mark-last-mark-position))) + +(add-hook 'post-command-hook + 'highlight-mark-post-command) ;; Local Variables: