comparison lisp/subr.el @ 112262:e4c00899294b

* lisp/subr.el (event-start, event-end): Doc fix (Bug#7826).
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 13 Jan 2011 00:12:01 -0500
parents 376148b31b5e
children 704fa1a3d5b4
comparison
equal deleted inserted replaced
112261:0071290a6df9 112262:e4c00899294b
852 ;; is this really correct? maybe remove mouse-movement? 852 ;; is this really correct? maybe remove mouse-movement?
853 (memq (event-basic-type object) '(mouse-1 mouse-2 mouse-3 mouse-movement))) 853 (memq (event-basic-type object) '(mouse-1 mouse-2 mouse-3 mouse-movement)))
854 854
855 (defsubst event-start (event) 855 (defsubst event-start (event)
856 "Return the starting position of EVENT. 856 "Return the starting position of EVENT.
857 If EVENT is a mouse or key press or a mouse click, this returns the location 857 EVENT should be a click, drag, or key press event.
858 of the event. 858 If it is a key press event, the return value has the form
859 If EVENT is a drag, this returns the drag's starting position. 859 (WINDOW POS (0 . 0) 0)
860 The return value is of the form 860 If it is a click or drag event, it has the form
861 (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW) 861 (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW)
862 IMAGE (DX . DY) (WIDTH . HEIGHT)) 862 IMAGE (DX . DY) (WIDTH . HEIGHT))
863 The `posn-' functions access elements of such lists." 863 The `posn-' functions access elements of such lists.
864 For more information, see Info node `(elisp)Click Events'.
865
866 If EVENT is a mouse or key press or a mouse click, this is the
867 position of the event. If EVENT is a drag, this is the starting
868 position of the drag."
864 (if (consp event) (nth 1 event) 869 (if (consp event) (nth 1 event)
865 (list (selected-window) (point) '(0 . 0) 0))) 870 (list (selected-window) (point) '(0 . 0) 0)))
866 871
867 (defsubst event-end (event) 872 (defsubst event-end (event)
868 "Return the ending location of EVENT. 873 "Return the ending location of EVENT.
869 EVENT should be a click, drag, or key press event. 874 EVENT should be a click, drag, or key press event.
870 If EVENT is a click event, this function is the same as `event-start'. 875 If EVENT is a key press event, the return value has the form
871 The return value is of the form 876 (WINDOW POS (0 . 0) 0)
877 If EVENT is a click event, this function is the same as
878 `event-start'. For click and drag events, the return value has
879 the form
872 (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW) 880 (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW)
873 IMAGE (DX . DY) (WIDTH . HEIGHT)) 881 IMAGE (DX . DY) (WIDTH . HEIGHT))
874 The `posn-' functions access elements of such lists." 882 The `posn-' functions access elements of such lists.
883 For more information, see Info node `(elisp)Click Events'.
884
885 If EVENT is a mouse or key press or a mouse click, this is the
886 position of the event. If EVENT is a drag, this is the starting
887 position of the drag."
875 (if (consp event) (nth (if (consp (nth 2 event)) 2 1) event) 888 (if (consp event) (nth (if (consp (nth 2 event)) 2 1) event)
876 (list (selected-window) (point) '(0 . 0) 0))) 889 (list (selected-window) (point) '(0 . 0) 0)))
877 890
878 (defsubst event-click-count (event) 891 (defsubst event-click-count (event)
879 "Return the multi-click count of EVENT, a click or drag event. 892 "Return the multi-click count of EVENT, a click or drag event.