Mercurial > hg > xemacs-beta
comparison src/sound.c @ 245:51092a27c943 r20-5b21
Import from CVS: tag r20-5b21
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:17:54 +0200 |
parents | 52952cbfc5b5 |
children | 8efd647ea9ca |
comparison
equal
deleted
inserted
replaced
244:78d4f1140794 | 245:51092a27c943 |
---|---|
86 CHECK_INT (volume); | 86 CHECK_INT (volume); |
87 vol = XINT (volume); | 87 vol = XINT (volume); |
88 } | 88 } |
89 | 89 |
90 GCPRO1 (file); | 90 GCPRO1 (file); |
91 file = Fexpand_file_name (file, Qnil); | 91 while (1) |
92 if (NILP (Ffile_readable_p (file))) | 92 { |
93 { | 93 file = Fexpand_file_name (file, Qnil); |
94 if (NILP (Ffile_exists_p (file))) | 94 if (!NILP(Ffile_readable_p (file))) |
95 error ("file does not exist."); | 95 break; |
96 else | 96 else |
97 error ("file is unreadable."); | 97 { |
98 /* #### This is crockish. It might be a better idea to try | |
99 to open the file, and use report_file_error() if it | |
100 fails. --hniksic */ | |
101 if (NILP (Ffile_exists_p (file))) | |
102 signal_simple_continuable_error ("File does not exist", file); | |
103 else | |
104 signal_simple_continuable_error ("File is unreadable", file); | |
105 } | |
98 } | 106 } |
99 UNGCPRO; | 107 UNGCPRO; |
100 | 108 |
101 #ifdef HAVE_NAS_SOUND | 109 #ifdef HAVE_NAS_SOUND |
102 if (DEVICE_CONNECTED_TO_NAS_P (d)) | 110 if (DEVICE_CONNECTED_TO_NAS_P (d)) |
336 (arg, sound, device)) | 344 (arg, sound, device)) |
337 { | 345 { |
338 struct device *d = decode_device (device); | 346 struct device *d = decode_device (device); |
339 | 347 |
340 XSETDEVICE (device, d); | 348 XSETDEVICE (device, d); |
349 | |
350 /* #### This is utterly disgusting, and is probably a remnant from | |
351 legacy code that used `ding'+`message' to signal error instead | |
352 calling `error'. As a result, there is no way to beep from Lisp | |
353 directly, without also invoking this aspect. Maybe we should | |
354 define a `ring-bell' function that simply beeps on the console, | |
355 which `ding' should invoke? --hniksic */ | |
341 if (NILP (arg) && !NILP (Vexecuting_macro)) | 356 if (NILP (arg) && !NILP (Vexecuting_macro)) |
342 /* Stop executing a keyboard macro. */ | 357 /* Stop executing a keyboard macro. */ |
343 error ("Keyboard macro terminated by a command ringing the bell"); | 358 error ("Keyboard macro terminated by a command ringing the bell"); |
344 else if (visible_bell && DEVMETH (d, flash, (d))) | 359 else if (visible_bell && DEVMETH (d, flash, (d))) |
345 ; | 360 ; |