Mercurial > emacs
changeset 64895:bde8cc177550
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.
author | Lars Hansen <larsh@soem.dk> |
---|---|
date | Wed, 10 Aug 2005 19:39:32 +0000 |
parents | aee8ba4e5b1a |
children | a7d19794a559 |
files | lisp/hilit-chg.el |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/hilit-chg.el Wed Aug 10 19:39:16 2005 +0000 +++ b/lisp/hilit-chg.el Wed Aug 10 19:39:32 2005 +0000 @@ -673,6 +673,7 @@ (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 @@ ))) (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: ;;