summaryrefslogtreecommitdiff
path: root/src/w32console.c
diff options
context:
space:
mode:
authorGeoff Voelker <voelker@cs.washington.edu>1998-10-28 05:48:12 +0000
committerGeoff Voelker <voelker@cs.washington.edu>1998-10-28 05:48:12 +0000
commit78859b80333152ba40768dbcfcaa6489ea38ed94 (patch)
tree1bbe7732dd323c7d26a85042c631046c491237c8 /src/w32console.c
parent93cbf229f9902f24ac85b1611a0b170654786778 (diff)
downloademacs-78859b80333152ba40768dbcfcaa6489ea38ed94.tar.gz
(Fset_message_beep): Recognize 'silent.
(w32_sys_ring_bell): Do nothing for the 'silent sound.
Diffstat (limited to 'src/w32console.c')
-rw-r--r--src/w32console.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/w32console.c b/src/w32console.c
index eef845fe020..635e01aba67 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -412,20 +412,28 @@ delete_glyphs (int n)
}
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 is nil to use the normal beep.")
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;