aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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)
412} 412}
413 413
414static unsigned int sound_type = 0xFFFFFFFF; 414static unsigned int sound_type = 0xFFFFFFFF;
415#define MB_EMACS_SILENT (0xFFFFFFFF - 1)
415 416
416void 417void
417w32_sys_ring_bell (void) 418w32_sys_ring_bell (void)
418{ 419{
419 if (sound_type == 0xFFFFFFFF) 420 if (sound_type == 0xFFFFFFFF)
421 {
420 Beep (666, 100); 422 Beep (666, 100);
423 }
424 else if (sound_type == MB_EMACS_SILENT)
425 {
426 /* Do nothing. */
427 }
421 else 428 else
422 MessageBeep (sound_type); 429 MessageBeep (sound_type);
423} 430}
424 431
425DEFUN ("set-message-beep", Fset_message_beep, Sset_message_beep, 1, 1, 0, 432DEFUN ("set-message-beep", Fset_message_beep, Sset_message_beep, 1, 1, 0,
426 "Set the sound generated when the bell is rung.\n\ 433 "Set the sound generated when the bell is rung.\n\
427SOUND is 'asterisk, 'exclamation, 'hand, 'question, or 'ok\n\ 434SOUND is 'asterisk, 'exclamation, 'hand, 'question, 'ok, or 'silent\n\
428to use the corresponding system sound for the bell.\n\ 435to use the corresponding system sound for the bell. The 'silent sound\n\
436prevents Emacs from making any sound at all.\n\
429SOUND is nil to use the normal beep.") 437SOUND is nil to use the normal beep.")
430 (sound) 438 (sound)
431 Lisp_Object sound; 439 Lisp_Object sound;
@@ -444,6 +452,8 @@ SOUND is nil to use the normal beep.")
444 sound_type = MB_ICONQUESTION; 452 sound_type = MB_ICONQUESTION;
445 else if (EQ (sound, intern ("ok"))) 453 else if (EQ (sound, intern ("ok")))
446 sound_type = MB_OK; 454 sound_type = MB_OK;
455 else if (EQ (sound, intern ("silent")))
456 sound_type = MB_EMACS_SILENT;
447 else 457 else
448 sound_type = 0xFFFFFFFF; 458 sound_type = 0xFFFFFFFF;
449 459