summaryrefslogtreecommitdiff
path: root/lisp/hilit-chg.el
diff options
context:
space:
mode:
authorLars Hansen <larsh@soem.dk>2005-08-10 19:39:32 +0000
committerLars Hansen <larsh@soem.dk>2005-08-10 19:39:32 +0000
commitbc3ee0758ff47919ba469f4cea66e0f9801ac21a (patch)
treef9481ca6514a661fe82b66d04a24e74a5d188e01 /lisp/hilit-chg.el
parent453cb6d4735c8c0f0716e86dd157455e5a55f8d6 (diff)
downloademacs-bc3ee0758ff47919ba469f4cea66e0f9801ac21a.tar.gz
Add handler to desktop-minor-mode-handlers.
(hilit-chg-desktop-restore): New function. (highlight-changes-mode): Add highlight-changes-mode to desktop-locals-to-save.
Diffstat (limited to 'lisp/hilit-chg.el')
-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:
;;