summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/hilit-chg.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index f4b9b71f5e7..7011ff37dd3 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -673,6 +673,7 @@ Hook variables:
(if new-highlight-changes-mode
;; mode is turned on -- but may be passive
(progn
+ (add-to-list 'desktop-locals-to-save 'highlight-changes-mode)
(hilit-chg-set new-highlight-changes-mode)
(or was-on
;; run highlight-changes-enable-hook once
@@ -1154,6 +1155,16 @@ from `global-highlight-changes' when turning on global Highlight Changes mode."
)))
(buffer-list)))
+;;;; Desktop support.
+
+;; Called by `desktop-create-buffer' to restore `highlight-changes-mode'.
+(defun hilit-chg-desktop-restore (desktop-buffer-locals)
+ (highlight-changes-mode
+ (or (cdr (assq 'highlight-changes-mode desktop-buffer-locals)) 1)))
+
+(add-to-list 'desktop-minor-mode-handlers
+ '(highlight-changes-mode . hilit-chg-desktop-restore))
+
;; ===================== debug ==================
;; For debug & test use:
;;