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

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

[elpa] master 771bc73 1/3: Add beacon-dont-blink-commands


From: Artur Malabarba
Subject: [elpa] master 771bc73 1/3: Add beacon-dont-blink-commands
Date: Fri, 16 Oct 2015 21:25:17 +0000

branch: master
commit 771bc731f7b2b62043cf99887290684eb7590d15
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>

    Add beacon-dont-blink-commands
---
 Readme.org |    9 +++++----
 beacon.el  |   10 +++++++++-
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/Readme.org b/Readme.org
index 1f20527..50631c8 100644
--- a/Readme.org
+++ b/Readme.org
@@ -25,10 +25,11 @@ That’s it.
   ~beacon-blink-when-window-changes~, and
   ~beacon-blink-when-point-moves~.
 
-- To prevent the beacon from blinking only on some major-modes,
-  configure ~beacon-dont-blink-major-modes~. For specific buffers, you
-  can do ~(setq-local beacon-mode nil)~. For even more refined
-  control, configure ~beacon-dont-blink-predicates~
+- To prevent the beacon from blinking only on specific situations
+  configure ~beacon-dont-blink-major-modes~,
+  ~beacon-dont-blink-predicates~, or ~beacon-dont-blink-commands~. You
+  can also disable it only in specific buffers by doing
+  ~(setq-local beacon-mode nil)~.
 
 - Beacon can also push the mark for you whenever point moves a long
   distance. For this, configure ~beacon-push-mark~.
diff --git a/beacon.el b/beacon.el
index 290054e..ab8b469 100644
--- a/beacon.el
+++ b/beacon.el
@@ -134,6 +134,13 @@ one of the major-modes on this list, the beacon will not
 blink."
   :type '(repeat symbol))
 
+(defcustom beacon-dont-blink-commands '(recenter-top-bottom)
+  "A list of commands that should not make the beacon blink.
+Use this for commands that scroll the window in very
+predictable ways, when the blink would be more distracting
+than helpful.."
+  :type '(repeat symbol))
+
 
 ;;; Overlays
 (defvar beacon--ovs nil)
@@ -259,7 +266,8 @@ Only returns `beacon-size' elements."
   (beacon--vanish)
   (unless (or (not beacon-mode)
               (run-hook-with-args-until-success 'beacon-dont-blink-predicates)
-              (seq-find #'derived-mode-p beacon-dont-blink-major-modes))
+              (seq-find #'derived-mode-p beacon-dont-blink-major-modes)
+              (memq (or this-command last-command) beacon-dont-blink-commands))
     (beacon--shine)
     (setq beacon--timer
           (run-at-time beacon-blink-delay



reply via email to

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