]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix desktop auto-save timer when linum-mode is used
authorEli Zaretskii <eliz@gnu.org>
Sat, 11 Nov 2017 09:53:42 +0000 (11:53 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 11 Nov 2017 09:53:42 +0000 (11:53 +0200)
* lisp/desktop.el (desktop-read): Use toplevel value of
window-configuration-change-hook when deciding whether desktop
auto-saving is enabled.  Suggested by Peter Neidhardt
<pe.neidhardt@googlemail.com>.  (Bug#28945)

lisp/desktop.el

index 2e53b15af389cff625beff06a6e8c481da99c2a5..c3c9da53b06377d4486d27d6ddfb0d90d5a83bc5 100644 (file)
@@ -1240,7 +1240,13 @@ Using it may cause conflicts.  Use it anyway? " owner)))))
            ;; disabled when loading the desktop fails with errors,
            ;; thus not overwriting the desktop with broken contents.
            (setq desktop-autosave-was-enabled
-                 (memq 'desktop-auto-save-set-timer window-configuration-change-hook))
+                 (memq 'desktop-auto-save-set-timer
+                        ;; Use the toplevel value of the hook, in case some
+                        ;; feature makes window-configuration-change-hook
+                        ;; buffer-local, and puts there stuff which
+                        ;; doesn't include our timer.
+                        (default-toplevel-value
+                          'window-configuration-change-hook)))
            (desktop-auto-save-disable)
            ;; Evaluate desktop buffer and remember when it was modified.
            (setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name))))