emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r117564: * src/frame.c (Fmouse_pixel_position): C


From: Stefan Monnier
Subject: [Emacs-diffs] emacs-24 r117564: * src/frame.c (Fmouse_pixel_position): Call Vmouse_position_function.
Date: Thu, 09 Oct 2014 13:50:15 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117564
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18638
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Thu 2014-10-09 09:50:10 -0400
message:
  * src/frame.c (Fmouse_pixel_position): Call Vmouse_position_function.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/frame.c                    frame.c-20091113204419-o5vbwnq5f7feedwu-243
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-10-08 07:30:57 +0000
+++ b/src/ChangeLog     2014-10-09 13:50:10 +0000
@@ -1,3 +1,8 @@
+2014-10-09  Stefan Monnier  <address@hidden>
+
+       * frame.c (Fmouse_pixel_position): Call Vmouse_position_function
+       (bug#18638).
+
 2014-10-08  K. Handa  <address@hidden>
 
        * coding.c (detect_coding_iso_2022): Set coding->rejected

=== modified file 'src/frame.c'
--- a/src/frame.c       2014-09-18 17:20:57 +0000
+++ b/src/frame.c       2014-10-09 13:50:10 +0000
@@ -1583,7 +1583,8 @@
 {
   struct frame *f;
   Lisp_Object lispy_dummy;
-  Lisp_Object x, y;
+  Lisp_Object x, y, retval;
+  struct gcpro gcpro1;
 
   f = SELECTED_FRAME ();
   x = y = Qnil;
@@ -1600,7 +1601,11 @@
     }
 
   XSETFRAME (lispy_dummy, f);
-  return Fcons (lispy_dummy, Fcons (x, y));
+  retval = Fcons (lispy_dummy, Fcons (x, y));
+  GCPRO1 (retval);
+  if (!NILP (Vmouse_position_function))
+    retval = call1 (Vmouse_position_function, retval);
+  RETURN_UNGCPRO (retval);
 }
 
 DEFUN ("set-mouse-position", Fset_mouse_position, Sset_mouse_position, 3, 3, 0,
@@ -4662,8 +4667,8 @@
 
   DEFVAR_LISP ("mouse-position-function", Vmouse_position_function,
               doc: /* If non-nil, function to transform normal value of 
`mouse-position'.
-`mouse-position' calls this function, passing its usual return value as
-argument, and returns whatever this function returns.
+`mouse-position' and `mouse-pixel-position' call this function, passing their
+usual return value as argument, and return whatever this function returns.
 This abnormal hook exists for the benefit of packages like `xt-mouse.el'
 which need to do mouse handling at the Lisp level.  */);
   Vmouse_position_function = Qnil;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]