diff options
| author | Eli Zaretskii | 2017-11-11 11:53:42 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-11-11 11:53:42 +0200 |
| commit | 72f813fb5692a4b8ef0c57808941f0e97a588d7c (patch) | |
| tree | 9e4cbc18b3d227823e5ddb350614ba2503881c45 | |
| parent | 44340b475f942cd65788ef9a4e75190a3646c444 (diff) | |
| download | emacs-72f813fb5692a4b8ef0c57808941f0e97a588d7c.tar.gz emacs-72f813fb5692a4b8ef0c57808941f0e97a588d7c.zip | |
Fix desktop auto-save timer when linum-mode is used
* 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)
| -rw-r--r-- | lisp/desktop.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/desktop.el b/lisp/desktop.el index 2e53b15af38..c3c9da53b06 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -1240,7 +1240,13 @@ Using it may cause conflicts. Use it anyway? " owner))))) | |||
| 1240 | ;; disabled when loading the desktop fails with errors, | 1240 | ;; disabled when loading the desktop fails with errors, |
| 1241 | ;; thus not overwriting the desktop with broken contents. | 1241 | ;; thus not overwriting the desktop with broken contents. |
| 1242 | (setq desktop-autosave-was-enabled | 1242 | (setq desktop-autosave-was-enabled |
| 1243 | (memq 'desktop-auto-save-set-timer window-configuration-change-hook)) | 1243 | (memq 'desktop-auto-save-set-timer |
| 1244 | ;; Use the toplevel value of the hook, in case some | ||
| 1245 | ;; feature makes window-configuration-change-hook | ||
| 1246 | ;; buffer-local, and puts there stuff which | ||
| 1247 | ;; doesn't include our timer. | ||
| 1248 | (default-toplevel-value | ||
| 1249 | 'window-configuration-change-hook))) | ||
| 1244 | (desktop-auto-save-disable) | 1250 | (desktop-auto-save-disable) |
| 1245 | ;; Evaluate desktop buffer and remember when it was modified. | 1251 | ;; Evaluate desktop buffer and remember when it was modified. |
| 1246 | (setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name)))) | 1252 | (setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name)))) |