summaryrefslogtreecommitdiff
path: root/lisp/calendar/appt.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-01-03 23:14:18 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-01-03 23:14:18 -0500
commit587a97bcb23bc6ea429ab790efa03f2260a9bca8 (patch)
tree5fcdf631e4deeaa3af185e9a03298f3f2cd6cc67 /lisp/calendar/appt.el
parent9c0387d786fe470de5190fe34f21b671d76c49f5 (diff)
downloademacs-587a97bcb23bc6ea429ab790efa03f2260a9bca8.tar.gz
* lisp/calendar/appt.el (appt-activate): Set the local `write-file-functions`
Diffstat (limited to 'lisp/calendar/appt.el')
-rw-r--r--lisp/calendar/appt.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index 29bcd6de2ce..281b89e088f 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -700,7 +700,7 @@ ARG is positive, otherwise off."
(let ((appt-active appt-timer))
(setq appt-active (if arg (> (prefix-numeric-value arg) 0)
(not appt-active)))
- (remove-hook 'write-file-functions #'appt-update-list)
+ (remove-hook 'write-file-functions #'appt-update-list 'local)
(or global-mode-string (setq global-mode-string '("")))
(delq 'appt-mode-string global-mode-string)
(when appt-timer
@@ -708,7 +708,7 @@ ARG is positive, otherwise off."
(setq appt-timer nil))
(if appt-active
(progn
- (add-hook 'write-file-functions #'appt-update-list)
+ (add-hook 'write-file-functions #'appt-update-list nil t)
(setq appt-timer (run-at-time t 60 #'appt-check)
global-mode-string
(append global-mode-string '(appt-mode-string)))