emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/eglot2emacs 0739cdcf20 031/120: Improve backwards-compatibility


From: João Távora
Subject: feature/eglot2emacs 0739cdcf20 031/120: Improve backwards-compatibility of eglot-mode-map
Date: Thu, 20 Oct 2022 07:16:47 -0400 (EDT)

branch: feature/eglot2emacs
commit 0739cdcf20850aa94c7bbfd9791e344fe9202fd1
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Improve backwards-compatibility of eglot-mode-map
    
    * eglot.el (eglot-mode-map): Only bind to eldoc-doc-buffer in Emacs
    28.1 or later.
---
 lisp/progmodes/eglot.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index bcd67205b5..72a0103c81 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]