]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/calendar/appt.el (appt-activate): Set the local `write-file-functions`
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 4 Jan 2021 04:14:18 +0000 (23:14 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 4 Jan 2021 04:14:18 +0000 (23:14 -0500)
lisp/calendar/appt.el

index 29bcd6de2ceaeb1e706ef75f5476842e7f4e5615..281b89e088fcc482c0255314de5428245743957c 100644 (file)
@@ -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)))