!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 specifies the duration of the beep, the default is 1 when omitted.
!bell is generally used in conjunction with !abort the bell functions warning the user, 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 1999
Last Modified: 1999/08/24
Generated On: 1999/12/01