bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request: quiet keyboard-quit


From: Paul Jarc
Subject: Re: Feature request: quiet keyboard-quit
Date: Wed, 22 May 2002 11:53:52 -0400
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu)

address@hidden (Oliver Scholz) wrote:
> Apparently `keyboard-quit' can't be defadviced "after" or "around":
>
> (defadvice keyboard-quit (around do-not-beep! activate)
>   (let ((ring-bell-function (lambda () nil)))
>     ad-do-it))
>
> .. is futile.

You could define a function like:
(defun my-keyboard-quit ()
  (interactive)
  (let ((ring-bell-function 'ignore))
    (keyboard-quit)))
Then bind that to C-g.

> .. is pointless when `keyboard-quit' gets a call from the lisp code.

You could redefine keyboard-quit itself to cover that case.  I'm not
sure whether byte-compiled code calling keyboard-quit would need to be
recompiled.


paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]