comparison lisp/subr.el @ 44251:3900f65547f0

(play-sound-file): Moved to simple.el.
author Richard M. Stallman <rms@gnu.org>
date Fri, 29 Mar 2002 23:13:26 +0000
parents 8bfb4deffa5f
children 30505fab0350
comparison
equal deleted inserted replaced
44250:9221d899e94f 44251:3900f65547f0
454 (or inserted 454 (or inserted
455 (setcdr tail (cons (cons key definition) (cdr tail)))) 455 (setcdr tail (cons (cons key definition) (cdr tail))))
456 (setq inserted t))) 456 (setq inserted t)))
457 (setq tail (cdr tail))))) 457 (setq tail (cdr tail)))))
458 458
459
459 (defmacro kbd (keys) 460 (defmacro kbd (keys)
460 "Convert KEYS to the internal Emacs key representation. 461 "Convert KEYS to the internal Emacs key representation.
461 KEYS should be a string constant in the format used for 462 KEYS should be a string constant in the format used for
462 saving keyboard macros (see `insert-kbd-macro')." 463 saving keyboard macros (see `insert-kbd-macro')."
463 (read-kbd-macro keys)) 464 (read-kbd-macro keys))
1865 (let ((rest (cdr found))) 1866 (let ((rest (cdr found)))
1866 (setcdr found nil) 1867 (setcdr found nil)
1867 (nconc found (list (cons toggle keymap)) rest)) 1868 (nconc found (list (cons toggle keymap)) rest))
1868 (setq minor-mode-map-alist (cons (cons toggle keymap) 1869 (setq minor-mode-map-alist (cons (cons toggle keymap)
1869 minor-mode-map-alist)))))))) 1870 minor-mode-map-alist))))))))
1870
1871 ;; XEmacs compatibility/convenience.
1872 (if (fboundp 'play-sound)
1873 (defun play-sound-file (file &optional volume device)
1874 "Play sound stored in FILE.
1875 VOLUME and DEVICE correspond to the keywords of the sound
1876 specification for `play-sound'."
1877 (interactive "fPlay sound file: ")
1878 (let ((sound (list :file file)))
1879 (if volume
1880 (plist-put sound :volume volume))
1881 (if device
1882 (plist-put sound :device device))
1883 (push 'sound sound)
1884 (play-sound sound))))
1885 1871
1886 ;; Clones ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1872 ;; Clones ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1887 1873
1888 (defun text-clone-maintain (ol1 after beg end &optional len) 1874 (defun text-clone-maintain (ol1 after beg end &optional len)
1889 "Propagate the changes made under the overlay OL1 to the other clones. 1875 "Propagate the changes made under the overlay OL1 to the other clones.