Mercurial > emacs
changeset 23563:18c5f58b70b5
(Fset_message_beep): Recognize 'silent.
(w32_sys_ring_bell): Do nothing for the 'silent sound.
author | Geoff Voelker <voelker@cs.washington.edu> |
---|---|
date | Wed, 28 Oct 1998 05:48:12 +0000 |
parents | 5f3243813b18 |
children | 6eb3e346d1fd |
files | src/w32console.c |
diffstat | 1 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/w32console.c Wed Oct 28 03:50:07 1998 +0000 +++ b/src/w32console.c Wed Oct 28 05:48:12 1998 +0000 @@ -412,20 +412,28 @@ } static unsigned int sound_type = 0xFFFFFFFF; +#define MB_EMACS_SILENT (0xFFFFFFFF - 1) void w32_sys_ring_bell (void) { if (sound_type == 0xFFFFFFFF) + { Beep (666, 100); + } + else if (sound_type == MB_EMACS_SILENT) + { + /* Do nothing. */ + } else - MessageBeep (sound_type); + MessageBeep (sound_type); } DEFUN ("set-message-beep", Fset_message_beep, Sset_message_beep, 1, 1, 0, "Set the sound generated when the bell is rung.\n\ -SOUND is 'asterisk, 'exclamation, 'hand, 'question, or 'ok\n\ -to use the corresponding system sound for the bell.\n\ +SOUND is 'asterisk, 'exclamation, 'hand, 'question, 'ok, or 'silent\n\ +to use the corresponding system sound for the bell. The 'silent sound\n\ +prevents Emacs from making any sound at all.\n\ SOUND is nil to use the normal beep.") (sound) Lisp_Object sound; @@ -444,6 +452,8 @@ sound_type = MB_ICONQUESTION; else if (EQ (sound, intern ("ok"))) sound_type = MB_OK; + else if (EQ (sound, intern ("silent"))) + sound_type = MB_EMACS_SILENT; else sound_type = 0xFFFFFFFF;