diff options
author | Case Duckworth | 2021-11-21 23:57:41 -0600 |
---|---|---|
committer | Case Duckworth | 2021-11-21 23:57:41 -0600 |
commit | a2657993bad828af6743c68931a0e848bfcdec53 (patch) | |
tree | 1e9220389184a0c68bc9f6bfe08edca3f2a362e6 /lisp/acdw-bell.el | |
parent | Un-stupidify org-mode filling (diff) | |
download | emacs-a2657993bad828af6743c68931a0e848bfcdec53.tar.gz emacs-a2657993bad828af6743c68931a0e848bfcdec53.zip |
I DECLARE BANKRUPTCY ... 8
Didn't think to do this till pretty .. written, so here we are.
Diffstat (limited to 'lisp/acdw-bell.el')
-rw-r--r-- | lisp/acdw-bell.el | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/lisp/acdw-bell.el b/lisp/acdw-bell.el deleted file mode 100644 index 514be1f..0000000 --- a/lisp/acdw-bell.el +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | ;;; acdw-bell.el --- flash mode-line on error -*- lexical-binding: t; -*- | ||
2 | |||
3 | ;; cribbed pretty heavily from doom-themes-ext-visual-bell.el ... | ||
4 | |||
5 | (require 'face-remap) | ||
6 | |||
7 | (defface acdw-bell '((t (:inherit mode-line-highlight))) | ||
8 | "Face to use for the mode-line when `doom-themes-visual-bell-config' is used." | ||
9 | :group 'mode-line) | ||
10 | |||
11 | ;;;###autoload | ||
12 | (defun acdw-bell/flash-mode-line (&optional beep-p) | ||
13 | "Blink the mode-line red briefly. Set `ring-bell-function' to this to use it. | ||
14 | If BEEP-P is non-nil, beep too." | ||
15 | (let ((acdw-bell//cookie | ||
16 | (face-remap-add-relative 'mode-line 'acdw-bell))) | ||
17 | (force-mode-line-update) | ||
18 | (when beep-p (beep)) | ||
19 | (run-with-timer 0.15 nil | ||
20 | (lambda (cookie buf) | ||
21 | (with-current-buffer buf | ||
22 | (face-remap-remove-relative cookie) | ||
23 | (force-mode-line-update))) | ||
24 | acdw-bell//cookie | ||
25 | (current-buffer)))) | ||
26 | |||
27 | (provide 'acdw-bell) | ||
28 | ;;; acdw-bell.el ends here | ||