diff lisp/prim/sound.el @ 138:6608ceec7cf8 r20-2b3

Import from CVS: tag r20-2b3
author cvs
date Mon, 13 Aug 2007 09:31:46 +0200
parents b980b6286996
children 585fb297b004
line wrap: on
line diff
--- a/lisp/prim/sound.el	Mon Aug 13 09:31:13 2007 +0200
+++ b/lisp/prim/sound.el	Mon Aug 13 09:31:46 2007 +0200
@@ -128,11 +128,15 @@
   (interactive "fSound file name: \n\
 SSymbol to name this sound: \n\
 nVolume (0 for default): ")
-  (or (symbolp sound-name) (error "sound-name not a symbol"))
-  (or (null volume) (integerp volume) (error "volume not an integer or nil"))
+  (unless (symbolp sound-name)
+    (error "sound-name not a symbol"))
+  (unless (null volume)
+    (integerp volume) (error "volume not an integer or nil"))
   (let (buf
 	data
 	(file (locate-file filename  default-sound-directory-list  sound-ext)))
+    (unless file
+      (error "Couldn't load sound file %s" filename))
     (unwind-protect
 	(save-excursion
 	  (set-buffer (setq buf (get-buffer-create " *sound-tmp*")))