Function: eglot--mode-line-props

eglot--mode-line-props is a byte-compiled function defined in eglot.el.gz.

Signature

(eglot--mode-line-props THING FACE DEFS &optional PREPEND)

Documentation

Helper for function eglot--mode-line-format(var)/eglot--mode-line-format(fun).

Uses THING, FACE, DEFS and PREPEND.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
(defun eglot--mode-line-props (thing face defs &optional prepend)
  "Helper for function `eglot--mode-line-format'.
Uses THING, FACE, DEFS and PREPEND."
  (cl-loop with map = (make-sparse-keymap)
           for (elem . rest) on defs
           for (key def help) = elem
           do (define-key map `[mode-line ,key] (eglot--mouse-call def t))
           concat (format "%s: %s" key help) into blurb
           when rest concat "\n" into blurb
           finally (return `(:propertize ,thing
                                         face ,face
                                         keymap ,map help-echo ,(concat prepend blurb)
                                         mouse-face mode-line-highlight))))