Function: posn-point
posn-point is a function defined in keyboard.c.
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.
Return nil if POSITION does not correspond to any buffer location (e.g.,
a click on a scroll bar).
Probably introduced at or before Emacs version 22.1.
Source Code
// Defined in /usr/src/emacs/src/keyboard.c
{
Lisp_Object posn = POSN_BUFFER_POSN (position);
if (!NILP (posn))
return posn;
/* POSITION is a short position list (such as returned by
`event--posn-at-point') without a POSN_BUFFER_POSN; fall back to
the location in POSN_POSN. */
posn = POSN_POSN (position);
if (CONSP (posn))
return XCAR (posn);
/* Apparently, POSN can also be `vertical-scroll-bar' (bug#13979). */
if (FIXNUMP (posn))
return posn;
return Qnil;
}