diff options
| author | Dave Love | 2000-10-04 11:24:51 +0000 |
|---|---|---|
| committer | Dave Love | 2000-10-04 11:24:51 +0000 |
| commit | ff77cf4034ea25b22912fa4bd36360b169873547 (patch) | |
| tree | 1819b4f90a1c01ff50f19f3e9f403f3d34547d49 | |
| parent | 3388f0a5545501b8ade4c1068bc3252f77fb9e20 (diff) | |
| download | emacs-ff77cf4034ea25b22912fa4bd36360b169873547.tar.gz emacs-ff77cf4034ea25b22912fa4bd36360b169873547.zip | |
(substitute-key-definition): Doc fix.
(play-sound-file): new command.
| -rw-r--r-- | lisp/subr.el | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 4d0cef6a087..ebf35337bb3 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -243,7 +243,7 @@ but optional second arg NODIGITS non-nil treats them like other chars." | |||
| 243 | "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. | 243 | "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. |
| 244 | In other words, OLDDEF is replaced with NEWDEF where ever it appears. | 244 | In other words, OLDDEF is replaced with NEWDEF where ever it appears. |
| 245 | Alternatively, if optional fourth argument OLDMAP is specified, we redefine | 245 | Alternatively, if optional fourth argument OLDMAP is specified, we redefine |
| 246 | in KEYMAP as NEWDEF those chars which are defined as OLDDEF in OLDMAP." | 246 | in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP." |
| 247 | ;; Don't document PREFIX in the doc string because we don't want to | 247 | ;; Don't document PREFIX in the doc string because we don't want to |
| 248 | ;; advertise it. It's meant for recursive calls only. Here's its | 248 | ;; advertise it. It's meant for recursive calls only. Here's its |
| 249 | ;; meaning | 249 | ;; meaning |
| @@ -1568,5 +1568,19 @@ If TOGGLE has a `:menu-tag', that is used for the menu item's label." | |||
| 1568 | (setq minor-mode-map-alist (cons (cons toggle keymap) | 1568 | (setq minor-mode-map-alist (cons (cons toggle keymap) |
| 1569 | minor-mode-map-alist)))))))) | 1569 | minor-mode-map-alist)))))))) |
| 1570 | 1570 | ||
| 1571 | ;; XEmacs compatibility/convenience. | ||
| 1572 | (if (fboundp 'play-sound) | ||
| 1573 | (defun play-sound-file (file &optional volume device) | ||
| 1574 | "Play sound stored in FILE. | ||
| 1575 | VOLUME and DEVICE correspond to the keywords of the sound | ||
| 1576 | specification for `play-sound'." | ||
| 1577 | (interactive "fPlay sound file: ") | ||
| 1578 | (let ((sound (list :file file))) | ||
| 1579 | (if volume | ||
| 1580 | (plist-put sound :volume volume)) | ||
| 1581 | (if device | ||
| 1582 | (plist-put sound :device device)) | ||
| 1583 | (push 'sound sound) | ||
| 1584 | (play-sound sound)))) | ||
| 1571 | 1585 | ||
| 1572 | ;;; subr.el ends here | 1586 | ;;; subr.el ends here |