Function: eglot--mouse-call

eglot--mouse-call is a byte-compiled function defined in eglot.el.gz.

Signature

(eglot--mouse-call WHAT &optional UPDATE-MODE-LINE)

Documentation

Make an interactive lambda for calling WHAT with the mouse.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
;;; Menu and other sugar
;;;
(defun eglot--mouse-call (what &optional update-mode-line)
  "Make an interactive lambda for calling WHAT with the mouse."
  (lambda (event)
    (interactive "e")
    (let ((start (event-start event))) (with-selected-window (posn-window start)
                                         (save-excursion
                                           (unless (posn-area start)
                                             (goto-char (posn-point start)))
                                           (call-interactively what)
                                           (when update-mode-line
                                             (force-mode-line-update t)))))))