Function: posn-point

posn-point is a byte-compiled function defined in subr.el.gz.

Signature

(posn-point POSITION)

Documentation

Return the buffer location in POSITION.

POSITION should be a list of the form returned by the event-start and event-end functions. Returns nil if POSITION does not correspond to any buffer location (e.g. a click on a scroll bar).

View in manual

Probably introduced at or before Emacs version 22.1.

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun posn-point (position)
  "Return the buffer location in POSITION.
POSITION should be a list of the form returned by the `event-start'
and `event-end' functions.
Returns nil if POSITION does not correspond to any buffer location (e.g.
a click on a scroll bar)."
  (declare (side-effect-free t))
  (or (nth 5 position)
      (let ((pt (nth 1 position)))
        (or (car-safe pt)
            ;; Apparently this can also be `vertical-scroll-bar' (bug#13979).
            (if (integerp pt) pt)))))