[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19203: visible-bell not acting like a special variable?
From: |
martin rudalics |
Subject: |
bug#19203: visible-bell not acting like a special variable? |
Date: |
Fri, 28 Nov 2014 19:38:28 +0100 |
> (setq visible-bell t) ; no bell
> (let ((visible-bell nil)) ; but ring bell for this one
> (next-line)) ; when at end of buffer, C-x C-e should ring the bell. it
> doesn't.
>
> why doesn't this work?
Because the bell doesn't ring within the scope of the `let'. Try
(setq visible-bell t)
(defun set-visible-bell ()
(setq visible-bell t))
(defun ding-ding ()
(add-hook 'post-command-hook 'set-visible-bell)
(setq visible-bell nil)
(ding))
(ding-ding)
instead.
martin