# HG changeset patch # User Dave Love # Date 970658691 0 # Node ID 3a54b3a6bf40af0ae3574a1324b57c8bf2549159 # Parent 281c3dca483302dc264ddae3e492fa53d33465d4 (substitute-key-definition): Doc fix. (play-sound-file): new command. diff -r 281c3dca4833 -r 3a54b3a6bf40 lisp/subr.el --- a/lisp/subr.el Wed Oct 04 09:59:43 2000 +0000 +++ b/lisp/subr.el Wed Oct 04 11:24:51 2000 +0000 @@ -243,7 +243,7 @@ "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. In other words, OLDDEF is replaced with NEWDEF where ever it appears. Alternatively, if optional fourth argument OLDMAP is specified, we redefine -in KEYMAP as NEWDEF those chars which are defined as OLDDEF in OLDMAP." +in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP." ;; Don't document PREFIX in the doc string because we don't want to ;; advertise it. It's meant for recursive calls only. Here's its ;; meaning @@ -1568,5 +1568,19 @@ (setq minor-mode-map-alist (cons (cons toggle keymap) minor-mode-map-alist)))))))) +;; XEmacs compatibility/convenience. +(if (fboundp 'play-sound) + (defun play-sound-file (file &optional volume device) + "Play sound stored in FILE. +VOLUME and DEVICE correspond to the keywords of the sound +specification for `play-sound'." + (interactive "fPlay sound file: ") + (let ((sound (list :file file))) + (if volume + (plist-put sound :volume volume)) + (if device + (plist-put sound :device device)) + (push 'sound sound) + (play-sound sound)))) ;;; subr.el ends here