Function: event-start

event-start is a byte-compiled function defined in subr.el.gz.

Signature

(event-start EVENT)

Documentation

Return the starting position of EVENT.

EVENT should be a mouse click, drag, or key press event. If EVENT is nil, the value of posn-at-point is used instead.

The following accessor functions are used to access the elements of the position:

posn-window: The window of the event end, or its frame if the event end point belongs to no window. 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 coordinates 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.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun event-start (event)
  "Return the starting position of EVENT.
EVENT should be a mouse click, drag, or key press event.  If
EVENT is nil, the value of `posn-at-point' is used instead.

The following accessor functions are used to access the elements
of the position:

`posn-window': The window of the event end, or its frame if the
event end point belongs to no window.
`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 coordinates 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'."
  (or (and (consp event) (nth 1 event))
      (event--posn-at-point)))