Mercurial > emacs
comparison src/frame.c @ 3658:c2831d419bec
(Fmouse_position): Set up defaults before calling the hook.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 11 Jun 1993 17:14:31 +0000 |
parents | 507f64624555 |
children | 5160a6967f80 |
comparison
equal
deleted
inserted
replaced
3657:7503a402c721 | 3658:c2831d419bec |
---|---|
752 Lisp_Object lispy_dummy; | 752 Lisp_Object lispy_dummy; |
753 enum scroll_bar_part party_dummy; | 753 enum scroll_bar_part party_dummy; |
754 Lisp_Object x, y; | 754 Lisp_Object x, y; |
755 unsigned long long_dummy; | 755 unsigned long long_dummy; |
756 | 756 |
757 f = selected_frame; | |
758 x = y = Qnil; | |
759 | |
760 /* It's okay for the hook to refrain from storing anything. */ | |
757 if (mouse_position_hook) | 761 if (mouse_position_hook) |
758 (*mouse_position_hook) (&f, | 762 (*mouse_position_hook) (&f, |
759 &lispy_dummy, &party_dummy, | 763 &lispy_dummy, &party_dummy, |
760 &x, &y, | 764 &x, &y, |
761 &long_dummy); | 765 &long_dummy); |
762 else | |
763 { | |
764 f = selected_frame; | |
765 x = y = Qnil; | |
766 } | |
767 | 766 |
768 XSET (lispy_dummy, Lisp_Frame, f); | 767 XSET (lispy_dummy, Lisp_Frame, f); |
769 return Fcons (lispy_dummy, Fcons (make_number (x), make_number (y))); | 768 return Fcons (lispy_dummy, Fcons (x, y)); |
770 } | 769 } |
771 | 770 |
772 DEFUN ("set-mouse-position", Fset_mouse_position, Sset_mouse_position, 3, 3, 0, | 771 DEFUN ("set-mouse-position", Fset_mouse_position, Sset_mouse_position, 3, 3, 0, |
773 "Move the mouse pointer to the center of cell (X,Y) in FRAME.\n\ | 772 "Move the mouse pointer to the center of cell (X,Y) in FRAME.\n\ |
774 WARNING: If you use this under X, you should do `unfocus-frame' afterwards.") | 773 WARNING: If you use this under X, you should do `unfocus-frame' afterwards.") |