comparison src/frame.c @ 60754:09e1e04c1da6

(Fignore_event): Remove. (syms_of_frame): Don't defsubr it.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 19 Mar 2005 16:36:44 +0000
parents 3f2da5ea6238
children 64c5a821e9cd 26c9034f3533 13796b0653c7
comparison
equal deleted inserted replaced
60753:bbeddd423eb1 60754:09e1e04c1da6
761 { 761 {
762 /* Preserve prefix arg that the command loop just cleared. */ 762 /* Preserve prefix arg that the command loop just cleared. */
763 current_kboard->Vprefix_arg = Vcurrent_prefix_arg; 763 current_kboard->Vprefix_arg = Vcurrent_prefix_arg;
764 call1 (Vrun_hooks, Qmouse_leave_buffer_hook); 764 call1 (Vrun_hooks, Qmouse_leave_buffer_hook);
765 return do_switch_frame (event, 0, 0); 765 return do_switch_frame (event, 0, 0);
766 }
767
768 DEFUN ("ignore-event", Fignore_event, Signore_event, 0, 0, "",
769 doc: /* Do nothing.
770 This is a suitable binding for `iconify-frame' and `make-frame-visible'. */)
771 ()
772 {
773 /* Contrary to `handle-switch-frame', `ignore-event' is used from
774 `special-event-map'. Commands from that map are run in a special
775 way that automatically preserves the prefix-arg. Restoring
776 the prefix arg here is not just redundant but harmful:
777 - C-u C-x v =
778 - current-prefix-arg is set to non-nil, prefix-arg is set to nil.
779 - after the first prompt, the exit-minibuffer-hook is run which may
780 iconify a frame and thus push a `iconify-frame' event.
781 - after running exit-minibuffer-hook, current-prefix-arg is
782 restored to the non-nil value it had before the prompt.
783 - we enter the second prompt.
784 current-prefix-arg is non-nil, prefix-arg is nil.
785 - before running the first real event, we run the special iconify-frame
786 event, but we pass the `special' arg to execute-command so
787 current-prefix-arg and prefix-arg are left untouched.
788 - here we foolishly copy the non-nil current-prefix-arg to prefix-arg.
789 - the next key event will have a spuriously non-nil current-prefix-arg.
790 current_kboard->Vprefix_arg = Vcurrent_prefix_arg; */
791 return Qnil;
792 } 766 }
793 767
794 DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, 768 DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0,
795 doc: /* Return the frame that is now selected. */) 769 doc: /* Return the frame that is now selected. */)
796 () 770 ()
4125 defsubr (&Sactive_minibuffer_window); 4099 defsubr (&Sactive_minibuffer_window);
4126 defsubr (&Sframep); 4100 defsubr (&Sframep);
4127 defsubr (&Sframe_live_p); 4101 defsubr (&Sframe_live_p);
4128 defsubr (&Smake_terminal_frame); 4102 defsubr (&Smake_terminal_frame);
4129 defsubr (&Shandle_switch_frame); 4103 defsubr (&Shandle_switch_frame);
4130 defsubr (&Signore_event);
4131 defsubr (&Sselect_frame); 4104 defsubr (&Sselect_frame);
4132 defsubr (&Sselected_frame); 4105 defsubr (&Sselected_frame);
4133 defsubr (&Swindow_frame); 4106 defsubr (&Swindow_frame);
4134 defsubr (&Sframe_root_window); 4107 defsubr (&Sframe_root_window);
4135 defsubr (&Sframe_first_window); 4108 defsubr (&Sframe_first_window);