Function: flash-echo-area-bell-function
flash-echo-area-bell-function is an autoloaded and byte-compiled
function defined in ring-bell-fns.el.gz.
Signature
(flash-echo-area-bell-function)
Documentation
Indicate ringing the bell by flashing the echo area.
Intended to be used in ring-bell-function.
Probably introduced at or before Emacs version 31.1.
Source Code
;; Defined in /usr/src/emacs/lisp/ring-bell-fns.el.gz
;;;###autoload
(defun flash-echo-area-bell-function ()
"Indicate ringing the bell by flashing the echo area.
Intended to be used in `ring-bell-function'."
;; pulse-faces uses run-with-timer if `pulse-face-duration'
;; is long, which makes the flashing in the echo area not visible.
;; for fix this then apply the flashing to *Echo Area 0*
;; and minibuffer buffer for the `run-with-timer',
;; and fallback to minibuffer buffer due performance.
(if (> pulse-face-duration 0.1)
(dolist (buf `(,(window-buffer (minibuffer-window))
;; get or create the echo area for flash it too.
,(get-buffer-create" *Echo Area 0*")))
(redisplay)
(with-current-buffer buf
(pulse-faces '(default) flash-face-attributes)))
(with-current-buffer (window-buffer (minibuffer-window))
;; For make the flash effect take effect in the
;; minibuffer/echo area, insert a space only if it is empty.
(if (= (buffer-size) 0)
(insert ?\s))
(pulse-faces '(default) flash-face-attributes))))