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

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

[elpa] externals/gtags-mode a2c84b5a2b 28/61: Optimize avoiding with-cur


From: ELPA Syncer
Subject: [elpa] externals/gtags-mode a2c84b5a2b 28/61: Optimize avoiding with-current-buffer.
Date: Thu, 28 Apr 2022 10:57:39 -0400 (EDT)

branch: externals/gtags-mode
commit a2c84b5a2b8aa41fb2ad1b91145987ba343c4175
Author: Jimmy Aguilar Mena <kratsbinovish@gmail.com>
Commit: Jimmy Aguilar Mena <kratsbinovish@gmail.com>

    Optimize avoiding with-current-buffer.
    
    This is a minimal change but if can be better why do it worst?
---
 global-xref.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/global-xref.el b/global-xref.el
index 2e26b8d289..771a735146 100644
--- a/global-xref.el
+++ b/global-xref.el
@@ -306,8 +306,8 @@ any additional command line arguments to pass to GNU 
Global."
     ;; Enable the mode in all the files inside `global-xref--project-root'
     (when (called-interactively-p 'all)
       (mapc (lambda (buff)
-             (with-current-buffer buff
-               (unless global-xref-mode
+             (unless (buffer-local-value 'global-xref-mode buff)
+               (with-current-buffer buff
                  (global-xref-mode 1))))
            (global-xref--buffers-in-root global-xref--project-root))))
    (t



reply via email to

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