Function: posn-string

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

Signature

(posn-string POSITION)

Documentation

Return the string object of POSITION.

Value is a cons (STRING . STRING-POS), or nil if not a string. POSITION should be a list of the form returned by the event-start and event-end functions.

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun posn-string (position)
  "Return the string object of POSITION.
Value is a cons (STRING . STRING-POS), or nil if not a string.
POSITION should be a list of the form returned by the `event-start'
and `event-end' functions."
  (let ((x (nth 4 position)))
    ;; Apparently this can also be `handle' or `below-handle' (bug#13979).
    (when (consp x) x)))