Function: dictionary-word-at-mouse-event

dictionary-word-at-mouse-event is a byte-compiled function defined in dictionary.el.gz.

Signature

(dictionary-word-at-mouse-event EVENT)

Source Code

;; Defined in /usr/src/emacs/lisp/net/dictionary.el.gz
(defun dictionary-word-at-mouse-event (event)
  (let ((buf (tooltip-event-buffer event)))
    (when (bufferp buf)
      (with-current-buffer buf
        (let ((point (posn-point (event-end event))))
          ;; posn-point can return something other than buffer position when
          ;; the mouse pointer is over the menu bar or tool bar or tab-bar.
          (when (number-or-marker-p point)
            (if (use-region-p)
                (when (and (<= (region-beginning) point)
                           (<= point (region-end)))
                  (buffer-substring (region-beginning) (region-end)))
              (save-excursion
                (goto-char point)
                (current-word)))))))))