Function: bib-cite-setup-highlight-mouse-keymap

bib-cite-setup-highlight-mouse-keymap is a byte-compiled function defined in bib-cite.el.

Signature

(bib-cite-setup-highlight-mouse-keymap)

Documentation

Set up the bib-cite text in the current buffer to be clickable.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/bib-cite.el
;;This must be eval'ed when the LaTeX mode is in use.
;; bib-highlight-mouse-keymap is a local variable so each buffer can have it's
;; own.
(defun bib-cite-setup-highlight-mouse-keymap ()
  "Set up the bib-cite text in the current buffer to be clickable."
  (setq-local bib-highlight-mouse-keymap
              ;; First, copy the local keymap so we don't have
              ;; `disappearing' menus when the mouse is moved over a
              ;; \ref, \label or \cite command.

              ;; FIXME: Check out (mouse-major-mode-menu) to see how it
              ;;        grabs the local menus to display.  Maybe on
              ;;        `highlighted' commands we could only display the
              ;;        bib-cite stuff (or a subset of it).
              (let ((m (copy-keymap (current-local-map))))
                (define-key m [down-mouse-3] #'bib-display-mouse)
                (define-key m [mouse-2] #'bib-find-mouse)
                m)))