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

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

[elpa] externals/beacon 8dfe644 3/6: Only vanish beacon if the buffer is


From: Stefan Monnier
Subject: [elpa] externals/beacon 8dfe644 3/6: Only vanish beacon if the buffer is visible - #60 again
Date: Wed, 17 Mar 2021 18:39:44 -0400 (EDT)

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

    Only vanish beacon if the buffer is visible - #60 again
---
 beacon.el | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/beacon.el b/beacon.el
index 451df17..df88802 100644
--- a/beacon.el
+++ b/beacon.el
@@ -249,13 +249,11 @@ COLORS applied to each one."
 
 (defun beacon--vanish (&rest _)
   "Turn off the beacon."
-  (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))))
+  (when (get-buffer-window)
+    (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]