emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/beacon fc63ae6 2/6: Don't mess with match data in chang


From: Stefan Monnier
Subject: [elpa] externals/beacon fc63ae6 2/6: Don't mess with match data in change hooks - Fix #60
Date: Wed, 17 Mar 2021 18:39:44 -0400 (EDT)

branch: externals/beacon
commit fc63ae66c78db11f58dbbad9b3c2772d5c00a805
Author: Artur Malabarba <artur@endlessparentheses.com>
Commit: Artur Malabarba <artur@endlessparentheses.com>

    Don't mess with match data in change hooks - Fix #60
---
 beacon.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/beacon.el b/beacon.el
index 28fa029..451df17 100644
--- a/beacon.el
+++ b/beacon.el
@@ -249,12 +249,13 @@ COLORS applied to each one."
 
 (defun beacon--vanish (&rest _)
   "Turn off the beacon."
-  (unless (string-match "\\` *\\*\\(temp\\|temp-buffer\\|Echo Area.*\\)\\*"
-                        (buffer-name))
-    (when (timerp beacon--timer)
-      (cancel-timer beacon--timer))
-    (mapc #'delete-overlay beacon--ovs)
-    (setq beacon--ovs nil)))
+  (save-match-data
+    (unless (string-match "\\` *\\*\\(temp\\|temp-buffer\\|Echo Area.*\\)\\*"
+                          (buffer-name))
+      (when (timerp beacon--timer)
+        (cancel-timer beacon--timer))
+      (mapc #'delete-overlay beacon--ovs)
+      (setq beacon--ovs nil))))
 
 
 ;;; Colors



reply via email to

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