GNU bug report logs - #19203
visible-bell not acting like a special variable?

Previous Next

Package: emacs;

Reported by: Mario Valencia <mariovalspi <at> gmail.com>

Date: Thu, 27 Nov 2014 11:51:01 UTC

Severity: minor

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Mario Valencia <mariovalspi <at> gmail.com>, 19203 <at> debbugs.gnu.org
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




This bug report was last modified 10 years and 205 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.