branch: externals/gtags-mode commit a2c84b5a2b8aa41fb2ad1b91145987ba343c4175 Author: Jimmy Aguilar Mena <kratsbinov...@gmail.com> Commit: Jimmy Aguilar Mena <kratsbinov...@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