diff options
| author | Kenichi Handa <handa@m17n.org> | 2011-01-14 13:08:30 +0900 |
|---|---|---|
| committer | Kenichi Handa <handa@m17n.org> | 2011-01-14 13:08:30 +0900 |
| commit | 66399c0a66e87c20edad6a7eb2474981d9bc7e4e (patch) | |
| tree | 9998842124f34c1c0e75d6f9b796fd690ed2ea6d /lisp/subr.el | |
| parent | 1a6a03e4a30d48bdbb3f188c7de0c0ab09e16992 (diff) | |
| parent | c88aaf48b207664ac714d161061488c86b0963d9 (diff) | |
| download | emacs-66399c0a66e87c20edad6a7eb2474981d9bc7e4e.tar.gz | |
merge emacs-23
Diffstat (limited to 'lisp/subr.el')
| -rw-r--r-- | lisp/subr.el | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index d8618172103..7ddabbc0e90 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -854,24 +854,37 @@ in the current Emacs session, then this function may return nil." (defsubst event-start (event) "Return the starting position of EVENT. -If EVENT is a mouse or key press or a mouse click, this returns the location -of the event. -If EVENT is a drag, this returns the drag's starting position. -The return value is of the form +EVENT should be a click, drag, or key press event. +If it is a key press event, the return value has the form + (WINDOW POS (0 . 0) 0) +If it is a click or drag event, it has the form (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW) IMAGE (DX . DY) (WIDTH . HEIGHT)) -The `posn-' functions access elements of such lists." +The `posn-' functions access elements of such lists. +For more information, see Info node `(elisp)Click Events'. + +If EVENT is a mouse or key press or a mouse click, this is the +position of the event. If EVENT is a drag, this is the starting +position of the drag." (if (consp event) (nth 1 event) (list (selected-window) (point) '(0 . 0) 0))) (defsubst event-end (event) "Return the ending location of EVENT. EVENT should be a click, drag, or key press event. -If EVENT is a click event, this function is the same as `event-start'. -The return value is of the form +If EVENT is a key press event, the return value has the form + (WINDOW POS (0 . 0) 0) +If EVENT is a click event, this function is the same as +`event-start'. For click and drag events, the return value has +the form (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW) IMAGE (DX . DY) (WIDTH . HEIGHT)) -The `posn-' functions access elements of such lists." +The `posn-' functions access elements of such lists. +For more information, see Info node `(elisp)Click Events'. + +If EVENT is a mouse or key press or a mouse click, this is the +position of the event. If EVENT is a drag, this is the starting +position of the drag." (if (consp event) (nth (if (consp (nth 2 event)) 2 1) event) (list (selected-window) (point) '(0 . 0) 0))) |
