]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove duplicates from imenu
authorMichal Krzywkowski <k.michal@zoho.com>
Wed, 31 Oct 2018 11:54:26 +0000 (12:54 +0100)
committerMichal Krzywkowski <k.michal@zoho.com>
Wed, 31 Oct 2018 11:56:40 +0000 (12:56 +0100)
* eglot.el (eglot-imenu): Don't append the result list to itself,
  which causes duplicates.

lisp/progmodes/eglot.el

index a234e17c0b1297ca32ad55ec8717b1d3ac57e361..2b39849f9bc4b095def00d5083c0253ca62b600d 100644 (file)
@@ -1664,12 +1664,10 @@ If SKIP-SIGNATURE, don't try to send textDocument/signatureHelp."
               (jsonrpc-request (eglot--current-server-or-lose)
                                :textDocument/documentSymbol
                                `(:textDocument ,(eglot--TextDocumentIdentifier))))))
-        (append
-         (cl-remove nil
-                    (seq-group-by (lambda (e) (get-text-property 0 :kind (car e)))
-                                  entries)
-                    :key #'car)
-         entries))
+        (cl-remove nil
+                   (seq-group-by (lambda (e) (get-text-property 0 :kind (car e)))
+                                 entries)
+                   :key #'car))
     (funcall oldfun)))
 
 (defun eglot--apply-text-edits (edits &optional version)