Function: help-at-pt-string

help-at-pt-string is an autoloaded and byte-compiled function defined in help-at-pt.el.gz.

Signature

(help-at-pt-string &optional KBD)

Documentation

Return the help-echo string at point.

Normally, the string produced by the help-echo text or overlay property, or nil, is returned. If KBD is non-nil, kbd-help is used instead, and any help-echo property is ignored. In this case, the return value can also be t, if that is the value of the kbd-help property.

Source Code

;; Defined in /usr/src/emacs/lisp/help-at-pt.el.gz
;;;###autoload
(defun help-at-pt-string (&optional kbd)
  "Return the help-echo string at point.
Normally, the string produced by the `help-echo' text or overlay
property, or nil, is returned.
If KBD is non-nil, `kbd-help' is used instead, and any
`help-echo' property is ignored.  In this case, the return value
can also be t, if that is the value of the `kbd-help' property."
  (save-excursion
    (let* ((prop (if kbd 'kbd-help 'help-echo))
           (pair (get-char-property-and-overlay (point) prop))
           (pair (if (car pair) pair
                     (unless (bobp)
                       (backward-char)
                       (get-char-property-and-overlay (point) prop))))
           (val (car pair))
           (ov (cdr pair)))
      (if (functionp val)
          (funcall val (selected-window) (if ov ov (current-buffer)) (point))
          (eval val)))))