!bell - Sound audio alarm
!bell [n]
!bell gives a warning (audible or visual) to alert the user of a problem. !bell honors the quiet(2m) mode, as such if quiet mode is disabled an audible warning is given, otherwise a visual warning is given to the user (usually the message "[BELL]" in the bottom left hand corner).
The optional numerical argument n can be used to over-ride the current setting of the quite, a value of 0 specifies a quite bell, 2 an audible one, when omitted the default is 1 for honoring the quite mode.
!bell is generally used in conjunction with !abort, the !bell function warning the user and the !abort function to quit the macro.
The following example checks for incoming mail and is taken from mail.emf. If any mail has arrived an audible warning is assured by toggling the quiet mode.
; ; Mail checker define-macro mail-check !if &seq &set %vm-mail-src ® "/history" &cat $platform "/mail-src" "" "" ml-write "[Incoming mail file not setup! Use Help/User setup]" !abort !endif 600000 create-callback mail-check ml-write &spr "Checking for mail in %s..." %vm-mail-src set-variable #l0 &cond &gre &stat "s" %vm-mail-src 0 "M" "-" !if ¬ &seq &mid $mode-line 2 1 #l0 set-variable #l1 &rig $mode-line &cond &seq &mid $mode-line 2 1 "%" 4 3 set-variable $mode-line &cat &cat &lef $mode-line 2 #l0 #l1 screen-update !if &seq #l0 "M" ; use no argument to the global-mode so it toggles it back to its original state !bell global-mode "quiet" !bell global-mode "quiet" !endif !endif ml-clear !emacro
(c) Copyright JASSPA 2001
Last Modified: 2001/07/14
Generated On: 2001/08/15