diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32console.c | 16 |
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 | ||
| 414 | static unsigned int sound_type = 0xFFFFFFFF; | 414 | static unsigned int sound_type = 0xFFFFFFFF; |
| 415 | #define MB_EMACS_SILENT (0xFFFFFFFF - 1) | ||
| 415 | 416 | ||
| 416 | void | 417 | void |
| 417 | w32_sys_ring_bell (void) | 418 | w32_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 | ||
| 425 | DEFUN ("set-message-beep", Fset_message_beep, Sset_message_beep, 1, 1, 0, | 432 | DEFUN ("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\ |
| 427 | SOUND is 'asterisk, 'exclamation, 'hand, 'question, or 'ok\n\ | 434 | SOUND is 'asterisk, 'exclamation, 'hand, 'question, 'ok, or 'silent\n\ |
| 428 | to use the corresponding system sound for the bell.\n\ | 435 | to use the corresponding system sound for the bell. The 'silent sound\n\ |
| 436 | prevents Emacs from making any sound at all.\n\ | ||
| 429 | SOUND is nil to use the normal beep.") | 437 | SOUND 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 | ||