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

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

[elpa] externals/eglot 73d3774 24/54: Fix #351: locally tweak imenu-crea


From: João Távora
Subject: [elpa] externals/eglot 73d3774 24/54: Fix #351: locally tweak imenu-create-index-function
Date: Thu, 16 Apr 2020 05:31:48 -0400 (EDT)

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

    Fix #351: locally tweak imenu-create-index-function
    
    * eglot.el (eglot--managed-mode): locally tweak
    imenu-create-index-function.
---
 eglot.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eglot.el b/eglot.el
index c25b7b7..a327655 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1247,7 +1247,8 @@ For example, to keep your Company customization use
     (eglot--setq-saving company-backends '(company-capf))
     (eglot--setq-saving company-tooltip-align-annotations t)
     (unless (eglot--stay-out-of-p 'imenu)
-      (add-function :before-until imenu-create-index-function #'eglot-imenu))
+      (add-function :before-until (local 'imenu-create-index-function)
+                    #'eglot-imenu))
     (flymake-mode 1)
     (eldoc-mode 1)
     (cl-pushnew (current-buffer) (eglot--managed-buffers 
eglot--cached-current-server)))
@@ -1267,6 +1268,7 @@ For example, to keep your Company customization use
     (remove-hook 'pre-command-hook 'eglot--pre-command-hook t)
     (cl-loop for (var . saved-binding) in eglot--saved-bindings
              do (set (make-local-variable var) saved-binding))
+    (remove-function (local 'imenu-create-index-function) #'eglot-imenu)
     (setq eglot--current-flymake-report-fn nil)
     (let ((server eglot--cached-current-server))
       (setq eglot--cached-current-server nil)



reply via email to

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