From: João Távora Date: Tue, 22 Oct 2019 11:18:53 +0000 (+0100) Subject: Unbreak imenu X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~288 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=66f5a1a8ee247ee3f314f5c12f539ea75aeeb66b;p=emacs.git Unbreak imenu * eglot.el (eglot-imenu): Unbreak. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index e29d8885774..9a0960d7a96 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/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."