[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company 13e2ada 39/46: Avoid calling executable-find fo
From: |
Dmitry Gutov |
Subject: |
[elpa] externals/company 13e2ada 39/46: Avoid calling executable-find for local buffers. |
Date: |
Wed, 30 Dec 2020 18:33:11 -0500 (EST) |
branch: externals/company
commit 13e2adaaefee0867d9456d14ba4396364c77b5eb
Author: Jimmy Aguilar Mena <kratsbinovish@gmail.com>
Commit: Jimmy Aguilar Mena <kratsbinovish@gmail.com>
Avoid calling executable-find for local buffers.
* company-gtags.el (company-gtags-executable) : Restored to the original
value.
(company-gtags--executable-p) : Test if file is remote and emacs version
before calling executable-find again.
---
company-gtags.el | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/company-gtags.el b/company-gtags.el
index ff84d29..164c7df 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -37,7 +37,8 @@
'company-gtags-gnu-global-program-name
'company-gtags-executable "earlier")
-(defcustom company-gtags-executable nil
+(defcustom company-gtags-executable
+ (executable-find "global")
"Location of GNU global executable."
:type 'string)
@@ -64,12 +65,13 @@ completion."
(defun company-gtags--executable-p ()
(cond
- (company-gtags-executable)
- ((eq company-gtags--executable 'unknown)
- (setq-local company-gtags--executable (if (version<= "27" emacs-version)
- (executable-find "global" t)
- (executable-find "global"))))
- (t company-gtags--executable)))
+ ((not (eq company-gtags--executable 'unknown)) ;; the value is already
cached
+ company-gtags--executable)
+ ((and (version<= "27" emacs-version) ;; can search remotely to set
+ (file-remote-p default-directory))
+ (setq-local company-gtags--executable (executable-find "global" t)))
+ (t ;; use default value (searched
locally)
+ (setq-local company-gtags--executable company-gtags-executable))))
(defun company-gtags--fetch-tags (prefix)
"Call global executable "
- [elpa] externals/company 25f6a27 26/46: company-echo-format: Handle company-common being nil, (continued)
- [elpa] externals/company 25f6a27 26/46: company-echo-format: Handle company-common being nil, Dmitry Gutov, 2020/12/30
- [elpa] externals/company bbff400 27/46: Fix tooltip background stretching to EOL, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 8c22b58 28/46: Merge pull request #1020 from hlissner/fix-tooltip-bg, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 5f5949b 33/46: Merge pull request #1024 from hlissner/fix-face-helper, Dmitry Gutov, 2020/12/30
- [elpa] externals/company dd92593 35/46: Merge pull request #1032 from kiennq/bug/company-selection-offset, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 97cfbc3 37/46: Merge pull request #1033 from edwargix/master, Dmitry Gutov, 2020/12/30
- [elpa] externals/company e1726c4 22/46: Typo, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 4462e7d 16/46: Merge pull request #1004 from jcs-PR/fix-badge, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 18b7b79 29/46: Fix company--face-attribute helper, Dmitry Gutov, 2020/12/30
- [elpa] externals/company bea3195 36/46: Implement `company-select-first' and `company-select-last', Dmitry Gutov, 2020/12/30
- [elpa] externals/company 13e2ada 39/46: Avoid calling executable-find for local buffers.,
Dmitry Gutov <=
- [elpa] externals/company 0edc87d 23/46: Fix a couple of warnings, Dmitry Gutov, 2020/12/30
- [elpa] externals/company c4d205a 31/46: Fix company--face-attribute for text-scaled faces, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 7c25cf4 34/46: company-set-selection: adding offset internally instead of via caller, Dmitry Gutov, 2020/12/30
- [elpa] externals/company e6fa6c0 40/46: Add connection-local caching for gtags executable., Dmitry Gutov, 2020/12/30
- [elpa] externals/company 01f5d10 38/46: Fix company-gtags to work with tramp and multiple locations., Dmitry Gutov, 2020/12/30
- [elpa] externals/company 056d19d 42/46: Rename a function and add NEWS entry, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 3644a59 45/46: company-gtags--executable: Make sure to return the detected value, Dmitry Gutov, 2020/12/30
- [elpa] externals/company fb9db07 19/46: Merge pull request #999 from kiennq/bug/company-selection-default, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 569ff3e 20/46: Copy edits, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 2de0d9a 21/46: More copy edits, Dmitry Gutov, 2020/12/30