From: Stefan Kangas Date: Sat, 15 Jan 2022 16:37:42 +0000 (+0100) Subject: Improve backwards-compatibility of eglot-mode-map X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~87 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0739cdcf20850aa94c7bbfd9791e344fe9202fd1;p=emacs.git Improve backwards-compatibility of eglot-mode-map * eglot.el (eglot-mode-map): Only bind to eldoc-doc-buffer in Emacs 28.1 or later. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index bcd67205b5b..72a0103c815 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1519,7 +1519,8 @@ and just return it. PROMPT shouldn't end with a question mark." ;;; (defvar eglot-mode-map (let ((map (make-sparse-keymap))) - (define-key map [remap display-local-help] 'eldoc-doc-buffer) + (when (fboundp 'eldoc-doc-buffer) ; Emacs 28.1 or later + (define-key map [remap display-local-help] #'eldoc-doc-buffer)) map)) (defvar-local eglot--current-flymake-report-fn nil