Is there a way to disable the beep in Emacs when trying to move the cursor beyond the beginning or end of a document? I normally wouldn't mind, but the momentum scrolling on my trackpad makes it so that it beeps a dozen times whenever I scroll to the top or bottom of a document.
I'd rather not disable the bell for other things, if that's possible.
Put
(setq ring-bell-function 'ignore)
in your .emacs
. This will disable the bell entirely, which might not be what you want.
This works pretty well for me to disable the bell just when scrolling to limits (add the following to your .emacs or other init file) :
(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)
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With