Re: [OT] emacs and clones - How to disable the console weeping?

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

 



Deboo ^ escribío:
> How do you disable the beeps when you either press a wrong key, press
> Ctrl-G or hit the top or EOF in emacs and clones? I already have  set
> bell-style set to none in /etc/inputrc.
> 
> Regards,
> Deboo
> 

(defun play-sound-file (file &optional volume device)
  "Play sound stored in FILE.
VOLUME and DEVICE correspond to the keywords of the sound
specification for `play-sound'."
  (interactive "fPlay sound file: ")
  (let ((sound (list :file file)))
    (if volume
	(plist-put sound :volume volume))
    (if device
	(plist-put sound :device device))
    (push 'sound sound)
    (play-sound sound)))

(setq ring-bell-function (lambda ()
			   (play-sound-file "/home/bpm/lib/emacs/sounds/doh.au")))

I have this in the .emacs

This way at least when it wants to beep, I get Homer Simpson.

-- 
Brian Millett - [ Ivanova, "Points of Departure"]
"And I thought I was a pessimist."


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux