emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116353: Document the `event-start' and `event-end'


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] trunk r116353: Document the `event-start' and `event-end' functions more completely
Date: Sun, 09 Feb 2014 02:14:41 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116353
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/14228
committer: Lars Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Sat 2014-02-08 18:13:23 -0800
message:
  Document the `event-start' and `event-end' functions more completely
  
  * doc/lispref/commands.texi (Accessing Mouse): Mention that these function
  also work on keyboard events.
  
  * lisp/subr.el (event-start): Doc fix (bug#14228).
  (event-end): Ditto.
modified:
  doc/lispref/ChangeLog          changelog-20091113204419-o5vbwnq5f7feedwu-6155
  doc/lispref/commands.texi      
commands.texi-20091113204419-o5vbwnq5f7feedwu-6165
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/subr.el                   subr.el-20091113204419-o5vbwnq5f7feedwu-151
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2014-02-08 05:32:54 +0000
+++ b/doc/lispref/ChangeLog     2014-02-09 02:13:23 +0000
@@ -1,3 +1,8 @@
+2014-02-09  Lars Ingebrigtsen  <address@hidden>
+
+       * commands.texi (Accessing Mouse): Mention that these function
+       also work on keyboard events (bug#14228).
+
 2014-02-08  Lars Ingebrigtsen  <address@hidden>
 
        * display.texi (Face Attributes): Add an index (bug#14924).

=== modified file 'doc/lispref/commands.texi'
--- a/doc/lispref/commands.texi 2014-01-05 23:36:13 +0000
+++ b/doc/lispref/commands.texi 2014-02-09 02:13:23 +0000
@@ -1934,9 +1934,12 @@
 @node Accessing Mouse
 @subsection Accessing Mouse Events
 @cindex mouse events, data in
address@hidden keyboard events, data in
 
   This section describes convenient functions for accessing the data in
-a mouse button or motion event.
+a mouse button or motion event.  Keyboard event data can be accessed
+using the same functions, but data elements that aren't applicable to
+keyboard events are zero or @code{nil}.
 
   The following two functions return a mouse position list
 (@pxref{Click Events}), specifying the position of a mouse event.

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-02-09 00:20:12 +0000
+++ b/lisp/ChangeLog    2014-02-09 02:13:23 +0000
@@ -1,3 +1,8 @@
+2014-02-09  Lars Ingebrigtsen  <address@hidden>
+
+       * subr.el (event-start): Doc fix (bug#14228).
+       (event-end): Ditto.
+
 2014-02-09  Glenn Morris  <address@hidden>
 
        * emacs-lisp/warnings.el (lwarn):

=== modified file 'lisp/subr.el'
--- a/lisp/subr.el      2014-02-08 03:37:57 +0000
+++ b/lisp/subr.el      2014-02-09 02:13:23 +0000
@@ -1019,38 +1019,36 @@
 
 (defun event-start (event)
   "Return the starting position of EVENT.
-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.
-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."
+EVENT should be a mouse click, drag, or key press event.
+
+The following accessor functions are used to access the elements
+of the position:
+
+`posn-window': The window the event is in.
+`posn-area': A symbol identifying the area the event occurred in,
+or nil if the event occurred in the text area.
+`posn-point': The buffer position of the event.
+`posn-x-y': The pixel-based coordiates of the event.
+`posn-col-row': The estimated column and row corresponding to the
+position of the event.
+`posn-actual-col-row': The actual column and row corresponding to the
+position of the event.
+`posn-string': The string object of the event, which is either
+nil or (STRING . POSITION)'.
+`posn-image': The image object of the event, if any.
+`posn-object': The image or string object of the event, if any.
+`posn-timestamp': The time the event occurred, in milliseconds.
+
+For more information, see Info node `(elisp)Click Events'."
   (if (consp event) (nth 1 event)
     (or (posn-at-point)
         (list (selected-window) (point) '(0 . 0) 0))))
 
 (defun event-end (event)
-  "Return the ending location of EVENT.
+  "Return the ending position of EVENT.
 EVENT should be a click, drag, or key press event.
-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.
-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."
+See `event-start' for a description of the value returned."
   (if (consp event) (nth (if (consp (nth 2 event)) 2 1) event)
     (or (posn-at-point)
         (list (selected-window) (point) '(0 . 0) 0))))


reply via email to

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