+(defcustom beacon-dont-blink-commands '(next-line previous-line
+ forward-line)
+ "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))
+
+(defcustom beacon-before-blink-hook nil
+ "Hook run immediately before blinking the beacon."
+ :type 'hook)
+
+\f
+;;; Internal variables
+(defvar beacon--window-scrolled nil)
+(defvar beacon--previous-place nil)
+(defvar beacon--previous-mark-head nil)
+(defvar beacon--previous-window nil)
+(defvar beacon--previous-window-start 0)
+
+(defun beacon--record-vars ()
+ (unless (window-minibuffer-p)
+ (setq beacon--previous-mark-head (car mark-ring))
+ (setq beacon--previous-place (point-marker))
+ (setq beacon--previous-window (selected-window))
+ (setq beacon--previous-window-start (window-start))))
+