Subtle mode-line blink for ring-bell-function

This commit is contained in:
Henrik Lissner 2016-10-24 02:46:12 +02:00
parent c05bffa826
commit 3e4ec3e6d8
2 changed files with 9 additions and 1 deletions

View file

@ -58,6 +58,15 @@
(y-or-n-p " Quit?")
t)))
;; A subtle bell: flash the mode-line
;; TODO More flexible colors (only suits dark themes)
(setq ring-bell-function
(lambda ()
(let ((bg (face-attribute 'mode-line :background)))
(set-face-attribute 'mode-line nil :background "#54252c")
(run-with-timer 0.1 nil `(lambda () (set-face-attribute 'mode-line nil :background ,bg))))))
;; y/n instead of yes/no
(fset 'yes-or-no-p 'y-or-n-p)

View file

@ -130,7 +130,6 @@ major-modes, the process gets killed.")
enable-recursive-minibuffers nil ; no minibufferception
idle-update-delay 5 ; update a little less often
major-mode 'text-mode
ring-bell-function 'ignore ; silence of the bells!
save-interprogram-paste-before-kill nil
sentence-end-double-space nil
;; http://ergoemacs.org/emacs/emacs_stop_cursor_enter_prompt.html