X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Fsound.el;h=e63c0e91094caadf27d46ef8225218802e11b66f;hp=62b2706deafdfe2e2f34c6bad62f9d0d50b43bac;hb=34360e98c9689b0a7eedab93e14df13281141bbd;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910 diff --git a/lisp/sound.el b/lisp/sound.el index 62b2706..e63c0e9 100644 --- a/lisp/sound.el +++ b/lisp/sound.el @@ -82,7 +82,7 @@ (const :format "" :value :duration) (integer :tag "Duration")))))) -(defcustom sound-load-alist +(defcustom sound-load-list '((load-sound-file "drum-beep" 'drum) (load-sound-file "quiet-beep" 'quiet) (load-sound-file "bass-snap" 'bass 80) @@ -105,15 +105,16 @@ :type 'directory ) -(defcustom sound-ext (if (or (eq system-type 'cygwin32) - (eq system-type 'windows-nt)) - ".wav:" ".au:") +;; #### This should really be a list. --hniksic +(defcustom sound-extension-list (if (or (eq system-type 'cygwin32) + (eq system-type 'windows-nt)) + ".wav:" ".au:") "Filename extensions to complete sound file name with. If more than one extension is used, they should be separated by \":\". " :group 'sound :type 'string) -(defcustom default-sound-directory-list ( list default-sound-directory ) +(defcustom default-sound-directory-list (locate-data-directory-list "sounds") "List of directories which to search for sound files" :group 'sound @@ -144,7 +145,8 @@ nVolume (0 for default): ") (error "volume not an integer or nil")) (let (buf data - (file (locate-file filename default-sound-directory-list sound-ext))) + (file (locate-file filename default-sound-directory-list + sound-extension-list))) (unless file (error "Couldn't load sound file %s" filename)) (unwind-protect @@ -180,7 +182,7 @@ server and XEmacs has the necessary sound support compiled in." (message "Loading sounds...") (setq sound-alist nil) ;; this is where the calls to load-sound-file get done - (mapc 'eval sound-load-alist) + (mapc 'eval sound-load-list) (setq sound-alist (append sound-default-alist sound-alist))