11

I've been looking into adopting Carbon Emacs for use on my Mac, and the only stumbling block I've run into is the annoying scroll beep when you try to scroll past the end of the document. I've looked online but I can't seem to find what I should add to my .emacs that will stop it from beeping when scrolling. I don't want to silence it completely, just when scrolling. Any ideas?

4

5 回答 5

9
(setq visible-bell t)

这使 emacs 闪烁而不是哔哔声。

于 2008-12-01T17:36:30.217 回答
7

Using the hints from the Emacs wiki AlarmBell page, this does it for me:

(defun my-bell-function ()
  (unless (memq this-command
        '(isearch-abort abort-recursive-edit exit-minibuffer
              keyboard-quit mwheel-scroll down up next-line previous-line
              backward-char forward-char))
    (ding)))
(setq ring-bell-function 'my-bell-function)

If you don't know the name of a command, press C-h k then the key/action you would like to get the name of.

于 2009-04-08T20:22:27.303 回答
3

在斯蒂芬哈萨德的回答和基普顿巴罗斯的评论之间:

(setq ring-bell-function 'ignore)

似乎是最简洁的,适用于 emacs 24.x,并回答了原始问题。

于 2014-12-16T20:20:47.550 回答
3

You will have to customize the ring-bell-function.

This page may provide hints:

http://www.emacswiki.org/emacs/AlarmBell

于 2008-11-27T19:12:34.640 回答
0

这似乎可以解决问题:

(setq ring-bell-function nil)
于 2013-01-12T17:29:02.017 回答