emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 71d2ec7aba3: (track-changes--call-signal): Silence late signals


From: Stefan Monnier
Subject: master 71d2ec7aba3: (track-changes--call-signal): Silence late signals
Date: Fri, 19 Apr 2024 22:20:05 -0400 (EDT)

branch: master
commit 71d2ec7aba3d6ef9386e807970b0bfaa2043d128
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    (track-changes--call-signal): Silence late signals
    
    * lisp/emacs-lisp/track-changes.el (track-changes--call-signal):
    Skip the call if the tracker was unregistered.
---
 lisp/emacs-lisp/track-changes.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/track-changes.el b/lisp/emacs-lisp/track-changes.el
index c11c976312b..ac7a99f3c3c 100644
--- a/lisp/emacs-lisp/track-changes.el
+++ b/lisp/emacs-lisp/track-changes.el
@@ -364,7 +364,7 @@ and re-enable the TRACKER corresponding to ID."
           (setf (track-changes--tracker-state id) track-changes--state)
           (funcall func beg end (or before lenbefore)))
       ;; Re-enable the tracker's signal only after running `func', so
-      ;; as to avoid recursive invocations.
+      ;; as to avoid nested invocations.
       (cl-pushnew id track-changes--clean-trackers))))
 
 ;;;; Auxiliary functions.
@@ -578,8 +578,10 @@ Details logged to `track-changes--error-log'")
 (defun track-changes--call-signal (buf tracker)
   (when (buffer-live-p buf)
     (with-current-buffer buf
-      ;; Silence ourselves if `track-changes-fetch' was called in the mean 
time.
-      (unless (memq tracker track-changes--clean-trackers)
+      ;; Silence ourselves if `track-changes-fetch' was called
+      ;; or the tracker was unregistered in the mean time.
+      (when (and (not (memq tracker track-changes--clean-trackers))
+                 (memq tracker track-changes--trackers))
         (funcall (track-changes--tracker-signal tracker) tracker)))))
 
 ;;;; Extra candidates for the API.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]