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.
This commit is contained in:
parent
a515788d7d
commit
abe5c13aa0
1 changed files with 11 additions and 0 deletions
|
@ -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:
|
||||
;;
|
||||
|
|
Loading…
Add table
Reference in a new issue