summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-09-27 11:52:28 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-09-27 11:52:28 -0400
commit19e0f0af6d27179baf76b5ebc67588dfc4b70588 (patch)
tree2802d5e2159f7de79f1bb79394933a4712141e1e /src
parent548e1696229e56053f5eb74b3f6d1c50041b0375 (diff)
downloademacs-19e0f0af6d27179baf76b5ebc67588dfc4b70588.tar.gz
* lisp/subr.el (track-mouse): New macro.
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyse-form): Remove track-mouse case. * lisp/emacs-lisp/bytecomp.el (byte-compile-track-mouse): Remove. * src/keyboard.c (track-mouse): Rename to internal--track-mouse. Make it into a function and change arg to be a function.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/keyboard.c12
2 files changed, 7 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3afd5ee6e20..53353ffc096 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
2014-09-27 Stefan Monnier <monnier@iro.umontreal.ca>
+ * keyboard.c (track-mouse): Rename to internal--track-mouse.
+ Make it into a function and change arg to be a function.
+
* lisp.mk (lisp): Add elisp-mode.elc.
2014-09-26 Paul Eggert <eggert@cs.ucla.edu>
diff --git a/src/keyboard.c b/src/keyboard.c
index e242a886f05..fcba475e5ee 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1287,13 +1287,9 @@ tracking_off (Lisp_Object old_value)
}
}
-DEFUN ("track-mouse", Ftrack_mouse, Strack_mouse, 0, UNEVALLED, 0,
- doc: /* Evaluate BODY with mouse movement events enabled.
-Within a `track-mouse' form, mouse motion generates input events that
-you can read with `read-event'.
-Normally, mouse motion is ignored.
-usage: (track-mouse BODY...) */)
- (Lisp_Object args)
+DEFUN ("internal--track-mouse", Ftrack_mouse, Strack_mouse, 1, 1, 0,
+ doc: /* Call BODYFUN with mouse movement events enabled. */)
+ (Lisp_Object bodyfun)
{
ptrdiff_t count = SPECPDL_INDEX ();
Lisp_Object val;
@@ -1302,7 +1298,7 @@ usage: (track-mouse BODY...) */)
do_mouse_tracking = Qt;
- val = Fprogn (args);
+ val = call0 (bodyfun);
return unbind_to (count, val);
}