Mercurial > hg > xemacs-beta
comparison src/device.c @ 771:943eaba38521
[xemacs-hg @ 2002-03-13 08:51:24 by ben]
The big ben-mule-21-5 check-in!
Various files were added and deleted. See CHANGES-ben-mule.
There are still some test suite failures. No crashes, though.
Many of the failures have to do with problems in the test suite itself
rather than in the actual code. I'll be addressing these in the next
day or so -- none of the test suite failures are at all critical.
Meanwhile I'll be trying to address the biggest issues -- i.e. build
or run failures, which will almost certainly happen on various platforms.
All comments should be sent to ben@xemacs.org -- use a Cc: if necessary
when sending to mailing lists. There will be pre- and post- tags,
something like
pre-ben-mule-21-5-merge-in, and
post-ben-mule-21-5-merge-in.
author | ben |
---|---|
date | Wed, 13 Mar 2002 08:54:06 +0000 |
parents | af57a77cbc92 |
children | e38acbeb1cae |
comparison
equal
deleted
inserted
replaced
770:336a418893b5 | 771:943eaba38521 |
---|---|
595 | 595 |
596 /* #### the following should trap errors. */ | 596 /* #### the following should trap errors. */ |
597 setup_device_initial_specifier_tags (d); | 597 setup_device_initial_specifier_tags (d); |
598 | 598 |
599 UNGCPRO; | 599 UNGCPRO; |
600 unbind_to(speccount, Qnil); | 600 unbind_to (speccount); |
601 return device; | 601 return device; |
602 } | 602 } |
603 | 603 |
604 /* find a device other than the selected one. Prefer non-stream | 604 /* find a device other than the selected one. Prefer non-stream |
605 devices over stream devices. Maybe stay on the same console. */ | 605 devices over stream devices. Maybe stay on the same console. */ |
1204 #ifdef SIGWINCH | 1204 #ifdef SIGWINCH |
1205 EMACS_UNBLOCK_SIGNAL (SIGWINCH); | 1205 EMACS_UNBLOCK_SIGNAL (SIGWINCH); |
1206 #endif | 1206 #endif |
1207 } | 1207 } |
1208 | 1208 |
1209 static Lisp_Object | |
1210 unlock_device (Lisp_Object d) | |
1211 { | |
1212 UNLOCK_DEVICE (XDEVICE (d)); | |
1213 return Qnil; | |
1214 } | |
1215 | |
1209 void | 1216 void |
1210 call_critical_lisp_code (struct device *d, Lisp_Object function, | 1217 call_critical_lisp_code (struct device *d, Lisp_Object function, |
1211 Lisp_Object object) | 1218 Lisp_Object object) |
1212 { | 1219 { |
1213 int old_gc_currently_forbidden = gc_currently_forbidden; | 1220 int count = begin_gc_forbidden (); |
1214 Lisp_Object old_inhibit_quit = Vinhibit_quit; | 1221 specbind (Qinhibit_quit, Qt); |
1215 | 1222 record_unwind_protect (unlock_device, wrap_device (d)); |
1216 /* There's no reason to bother doing specbinds here, because if | 1223 |
1224 /* [[There's no real reason to bother doing unwind-protects, because if | |
1217 initialize-*-faces signals an error, emacs is going to crash | 1225 initialize-*-faces signals an error, emacs is going to crash |
1218 immediately. | 1226 immediately.]] But this sucks! This code is called not only during |
1227 the initial device, but for other devices as well! #### When dealing | |
1228 with non-initial devices, we should signal an error but NOT kill | |
1229 ourselves! --ben | |
1219 */ | 1230 */ |
1220 gc_currently_forbidden = 1; | |
1221 Vinhibit_quit = Qt; | |
1222 LOCK_DEVICE (d); | 1231 LOCK_DEVICE (d); |
1223 | 1232 |
1224 /* But it's useful to have an error handler; otherwise an infinite | 1233 /* But it's useful to have an error handler; otherwise an infinite |
1225 loop may result. */ | 1234 loop may result. */ |
1226 if (!NILP (object)) | 1235 if (!NILP (object)) |
1227 call1_with_handler (Qreally_early_error_handler, function, object); | 1236 call1_with_handler (Qreally_early_error_handler, function, object); |
1228 else | 1237 else |
1229 call0_with_handler (Qreally_early_error_handler, function); | 1238 call0_with_handler (Qreally_early_error_handler, function); |
1230 | 1239 |
1231 UNLOCK_DEVICE (d); | 1240 unbind_to (count); |
1232 Vinhibit_quit = old_inhibit_quit; | |
1233 gc_currently_forbidden = old_gc_currently_forbidden; | |
1234 } | 1241 } |
1235 | 1242 |
1236 | 1243 |
1237 /************************************************************************/ | 1244 /************************************************************************/ |
1238 /* initialization */ | 1245 /* initialization */ |