emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/eglot 6dd5de9 05/54: Unbreak imenu


From: João Távora
Subject: [elpa] externals/eglot 6dd5de9 05/54: Unbreak imenu
Date: Thu, 16 Apr 2020 05:31:45 -0400 (EDT)

branch: externals/eglot
commit 6dd5de9b5cb7d51acdc9530b651b9cc1266b7942
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Unbreak imenu
    
    * eglot.el (eglot-imenu): Unbreak.
---
 eglot.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/eglot.el b/eglot.el
index e29d888..9a0960d 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2252,10 +2252,11 @@ If SKIP-SIGNATURE, don't try to send 
textDocument/signatureHelp."
          :deferred :textDocument/documentHighlight))))
   eldoc-last-message)
 
-(defun eglot-imenu (oldfun)
-  "EGLOT's `imenu-create-index-function' overriding OLDFUN."
-  (if (eglot--server-capable :documentSymbolProvider)
-      (let ((entries
+(defun eglot-imenu ()
+  "EGLOT's `imenu-create-index-function'."
+  (unless (eglot--server-capable :documentSymbolProvider)
+    (eglot--error "Server isn't a :documentSymbolProvider"))
+  (let ((entries
              (mapcar
               (eglot--lambda
                   ((SymbolInformation) name kind location containerName)
@@ -2283,7 +2284,7 @@ If SKIP-SIGNATURE, don't try to send 
textDocument/signatureHelp."
                                           elems)))))
          (seq-group-by (lambda (e) (get-text-property 0 :kind (car e)))
                        entries)))
-    (funcall oldfun)))
+  )
 
 (defun eglot--apply-text-edits (edits &optional version)
   "Apply EDITS for current buffer if at VERSION, or if it's nil."



reply via email to

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