diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/frame.c | 13 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c6d78a5e8d1..63e0e728fee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-10-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * frame.c (Fmouse_pixel_position): Call Vmouse_position_function | ||
| 4 | (bug#18638). | ||
| 5 | |||
| 1 | 2014-10-08 K. Handa <handa@gnu.org> | 6 | 2014-10-08 K. Handa <handa@gnu.org> |
| 2 | 7 | ||
| 3 | * coding.c (detect_coding_iso_2022): Set coding->rejected | 8 | * coding.c (detect_coding_iso_2022): Set coding->rejected |
diff --git a/src/frame.c b/src/frame.c index 35fd190ba28..e894d218df7 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1583,7 +1583,8 @@ and nil for X and Y. */) | |||
| 1583 | { | 1583 | { |
| 1584 | struct frame *f; | 1584 | struct frame *f; |
| 1585 | Lisp_Object lispy_dummy; | 1585 | Lisp_Object lispy_dummy; |
| 1586 | Lisp_Object x, y; | 1586 | Lisp_Object x, y, retval; |
| 1587 | struct gcpro gcpro1; | ||
| 1587 | 1588 | ||
| 1588 | f = SELECTED_FRAME (); | 1589 | f = SELECTED_FRAME (); |
| 1589 | x = y = Qnil; | 1590 | x = y = Qnil; |
| @@ -1600,7 +1601,11 @@ and nil for X and Y. */) | |||
| 1600 | } | 1601 | } |
| 1601 | 1602 | ||
| 1602 | XSETFRAME (lispy_dummy, f); | 1603 | XSETFRAME (lispy_dummy, f); |
| 1603 | return Fcons (lispy_dummy, Fcons (x, y)); | 1604 | retval = Fcons (lispy_dummy, Fcons (x, y)); |
| 1605 | GCPRO1 (retval); | ||
| 1606 | if (!NILP (Vmouse_position_function)) | ||
| 1607 | retval = call1 (Vmouse_position_function, retval); | ||
| 1608 | RETURN_UNGCPRO (retval); | ||
| 1604 | } | 1609 | } |
| 1605 | 1610 | ||
| 1606 | DEFUN ("set-mouse-position", Fset_mouse_position, Sset_mouse_position, 3, 3, 0, | 1611 | DEFUN ("set-mouse-position", Fset_mouse_position, Sset_mouse_position, 3, 3, 0, |
| @@ -4662,8 +4667,8 @@ is visible. In this case you can not overscroll. */); | |||
| 4662 | 4667 | ||
| 4663 | DEFVAR_LISP ("mouse-position-function", Vmouse_position_function, | 4668 | DEFVAR_LISP ("mouse-position-function", Vmouse_position_function, |
| 4664 | doc: /* If non-nil, function to transform normal value of `mouse-position'. | 4669 | doc: /* If non-nil, function to transform normal value of `mouse-position'. |
| 4665 | `mouse-position' calls this function, passing its usual return value as | 4670 | `mouse-position' and `mouse-pixel-position' call this function, passing their |
| 4666 | argument, and returns whatever this function returns. | 4671 | usual return value as argument, and return whatever this function returns. |
| 4667 | This abnormal hook exists for the benefit of packages like `xt-mouse.el' | 4672 | This abnormal hook exists for the benefit of packages like `xt-mouse.el' |
| 4668 | which need to do mouse handling at the Lisp level. */); | 4673 | which need to do mouse handling at the Lisp level. */); |
| 4669 | Vmouse_position_function = Qnil; | 4674 | Vmouse_position_function = Qnil; |