Function: tooltip-expr-to-print
tooltip-expr-to-print is a byte-compiled function defined in
tooltip.el.gz.
Signature
(tooltip-expr-to-print EVENT)
Documentation
Return an expression that should be printed for EVENT.
If a region is active and the mouse is inside the region, print the region. Otherwise, figure out the identifier around the point where the mouse is.
Source Code
;; Defined in /usr/src/emacs/lisp/tooltip.el.gz
(defun tooltip-expr-to-print (event)
"Return an expression that should be printed for EVENT.
If a region is active and the mouse is inside the region, print
the region. Otherwise, figure out the identifier around the point
where the mouse is."
(with-current-buffer (tooltip-event-buffer event)
(let ((point (posn-point (event-end event))))
(if (use-region-p)
(when (and (<= (region-beginning) point) (<= point (region-end)))
(buffer-substring (region-beginning) (region-end)))
(tooltip-identifier-from-point point)))))