Mercurial > hg > xemacs-beta
comparison src/frame.c @ 546:666d73d6ac56
[xemacs-hg @ 2001-05-20 01:17:07 by ben]
fixes so MinGW compiles.
console-msw.h, scrollbar-msw.c, event-msw.c: we might receive scrollbar events on windows without scrollbars
(e.g. holding down and moving the wheel button).
dired.c: win9x support.
eval.c: doc comment about gcpro'ing in record_unwind_protect.
frame-msw.c: typo.
frame.c: avoid problems with errors during init_frame_3.
process-nt.c: remove unused mswindows-quote-process-args. rec for 21.4.
unexcw.c: use do/while.
autoload.el: Oops, off by one argument.
mouse.el: Add an argument to mouse-track so that hooks can be overridden.
(let-binding doesn't work when the hooks have been made local.)
modify mouse-track-run-hook accordingly, and fix mouse-track-default
and mouse-track-insert to use the new functionality.
printer.el: Oops, off by one paren.
author | ben |
---|---|
date | Sun, 20 May 2001 01:17:16 +0000 |
parents | 9a775fb11bb7 |
children | ed498ef2108b |
comparison
equal
deleted
inserted
replaced
545:9a775fb11bb7 | 546:666d73d6ac56 |
---|---|
334 foolist = Fcopy_sequence (foolist); | 334 foolist = Fcopy_sequence (foolist); |
335 | 335 |
336 return foolist; | 336 return foolist; |
337 } | 337 } |
338 | 338 |
339 Lisp_Object | |
340 restore_frame_list_to_its_unbesmirched_state (Lisp_Object kawnz) | |
341 { | |
342 Lisp_Object lissed = XCDR (kawnz); | |
343 if (!EQ (lissed, Qunbound)) | |
344 DEVICE_FRAME_LIST (XDEVICE (XCAR (kawnz))) = lissed; | |
345 return Qnil; | |
346 } | |
347 | |
339 DEFUN ("make-frame", Fmake_frame, 0, 2, "", /* | 348 DEFUN ("make-frame", Fmake_frame, 0, 2, "", /* |
340 Create and return a new frame, displaying the current buffer. | 349 Create and return a new frame, displaying the current buffer. |
341 Runs the functions listed in `create-frame-hook' after frame creation. | 350 Runs the functions listed in `create-frame-hook' after frame creation. |
342 | 351 |
343 Optional argument PROPS is a property list (a list of alternating | 352 Optional argument PROPS is a property list (a list of alternating |
352 { | 361 { |
353 struct frame *f; | 362 struct frame *f; |
354 struct device *d; | 363 struct device *d; |
355 Lisp_Object frame = Qnil, name = Qnil, minibuf; | 364 Lisp_Object frame = Qnil, name = Qnil, minibuf; |
356 struct gcpro gcpro1, gcpro2, gcpro3; | 365 struct gcpro gcpro1, gcpro2, gcpro3; |
357 int speccount = specpdl_depth (); | 366 int speccount = specpdl_depth (), speccount2; |
358 int first_frame_on_device = 0; | 367 int first_frame_on_device = 0; |
359 int first_frame_on_console = 0; | 368 int first_frame_on_console = 0; |
369 Lisp_Object besmirched_cons = Qnil; | |
360 | 370 |
361 d = decode_device (device); | 371 d = decode_device (device); |
362 XSETDEVICE (device, d); | 372 XSETDEVICE (device, d); |
363 | 373 |
364 /* PROPS and NAME may be freshly-created, so make sure to GCPRO. */ | 374 /* PROPS and NAME may be freshly-created, so make sure to GCPRO. */ |
430 first frame. It kind of assumes that frameless devices don't | 440 first frame. It kind of assumes that frameless devices don't |
431 exist, but it shouldn't be too harmful. */ | 441 exist, but it shouldn't be too harmful. */ |
432 if (NILP (DEVICE_FRAME_LIST (d))) | 442 if (NILP (DEVICE_FRAME_LIST (d))) |
433 first_frame_on_device = 1; | 443 first_frame_on_device = 1; |
434 | 444 |
445 /* It's possible for one of the init methods below to signal an error; | |
446 in that case, let's make sure the device isn't besmirched by | |
447 having a half-initialized frame attached to it */ | |
448 speccount2 = specpdl_depth (); | |
449 record_unwind_protect (restore_frame_list_to_its_unbesmirched_state, | |
450 besmirched_cons = | |
451 Fcons (device, DEVICE_FRAME_LIST (d))); | |
452 | |
435 /* This *must* go before the init_*() methods. Those functions | 453 /* This *must* go before the init_*() methods. Those functions |
436 call Lisp code, and if any of them causes a warning to be displayed | 454 call Lisp code, and if any of them causes a warning to be displayed |
437 and the *Warnings* buffer to be created, it won't get added to | 455 and the *Warnings* buffer to be created, it won't get added to |
438 the frame-specific version of the buffer-alist unless the frame | 456 the frame-specific version of the buffer-alist unless the frame |
439 is accessible from the device. */ | 457 is accessible from the device. */ |
476 Fset_frame_properties (frame, props); | 494 Fset_frame_properties (frame, props); |
477 MAYBE_FRAMEMETH (f, init_frame_3, (f)); | 495 MAYBE_FRAMEMETH (f, init_frame_3, (f)); |
478 | 496 |
479 /* Hallelujah, praise the lord. */ | 497 /* Hallelujah, praise the lord. */ |
480 f->init_finished = 1; | 498 f->init_finished = 1; |
499 | |
500 XCDR (besmirched_cons) = Qunbound; | |
501 | |
502 unbind_to (speccount2, Qnil); | |
481 | 503 |
482 /* If this is the first frame on the device, make it the selected one. */ | 504 /* If this is the first frame on the device, make it the selected one. */ |
483 if (first_frame_on_device && NILP (DEVICE_SELECTED_FRAME (d))) | 505 if (first_frame_on_device && NILP (DEVICE_SELECTED_FRAME (d))) |
484 set_device_selected_frame (d, frame); | 506 set_device_selected_frame (d, frame); |
485 | 507 |