diff options
| author | Stefan Monnier | 2024-04-19 22:19:00 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2024-04-19 22:19:00 -0400 |
| commit | 71d2ec7aba3d6ef9386e807970b0bfaa2043d128 (patch) | |
| tree | 97882c88854395e2cc0fb5bea8e4b75b0f0abdf5 | |
| parent | f62c1b4cd00e5b2f1cdc94796cf55d006c3113eb (diff) | |
| download | emacs-71d2ec7aba3d6ef9386e807970b0bfaa2043d128.tar.gz emacs-71d2ec7aba3d6ef9386e807970b0bfaa2043d128.zip | |
(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.
| -rw-r--r-- | lisp/emacs-lisp/track-changes.el | 8 |
1 files 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." | |||
| 364 | (setf (track-changes--tracker-state id) track-changes--state) | 364 | (setf (track-changes--tracker-state id) track-changes--state) |
| 365 | (funcall func beg end (or before lenbefore))) | 365 | (funcall func beg end (or before lenbefore))) |
| 366 | ;; Re-enable the tracker's signal only after running `func', so | 366 | ;; Re-enable the tracker's signal only after running `func', so |
| 367 | ;; as to avoid recursive invocations. | 367 | ;; as to avoid nested invocations. |
| 368 | (cl-pushnew id track-changes--clean-trackers)))) | 368 | (cl-pushnew id track-changes--clean-trackers)))) |
| 369 | 369 | ||
| 370 | ;;;; Auxiliary functions. | 370 | ;;;; Auxiliary functions. |
| @@ -578,8 +578,10 @@ Details logged to `track-changes--error-log'") | |||
| 578 | (defun track-changes--call-signal (buf tracker) | 578 | (defun track-changes--call-signal (buf tracker) |
| 579 | (when (buffer-live-p buf) | 579 | (when (buffer-live-p buf) |
| 580 | (with-current-buffer buf | 580 | (with-current-buffer buf |
| 581 | ;; Silence ourselves if `track-changes-fetch' was called in the mean time. | 581 | ;; Silence ourselves if `track-changes-fetch' was called |
| 582 | (unless (memq tracker track-changes--clean-trackers) | 582 | ;; or the tracker was unregistered in the mean time. |
| 583 | (when (and (not (memq tracker track-changes--clean-trackers)) | ||
| 584 | (memq tracker track-changes--trackers)) | ||
| 583 | (funcall (track-changes--tracker-signal tracker) tracker))))) | 585 | (funcall (track-changes--tracker-signal tracker) tracker))))) |
| 584 | 586 | ||
| 585 | ;;;; Extra candidates for the API. | 587 | ;;;; Extra candidates for the API. |