[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company dccd04b 44/46: company-gtags--fetch-tags: Rever
From: |
Dmitry Gutov |
Subject: |
[elpa] externals/company dccd04b 44/46: company-gtags--fetch-tags: Revert an earlier change |
Date: |
Wed, 30 Dec 2020 18:33:12 -0500 (EST) |
branch: externals/company
commit dccd04b7fb658d366c2081b6ce7ddcd208ce7ae0
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
company-gtags--fetch-tags: Revert an earlier change
Just to simplify, #1038.
---
company-gtags.el | 48 +++++++++++++++++++++++-------------------------
1 file changed, 23 insertions(+), 25 deletions(-)
diff --git a/company-gtags.el b/company-gtags.el
index 06a303b..daf067f 100644
--- a/company-gtags.el
+++ b/company-gtags.el
@@ -89,31 +89,29 @@ completion."
company-gtags-executable)))
(defun company-gtags--fetch-tags (prefix)
- "Call global executable "
- (let ((caller-buffer (current-buffer)))
- (with-temp-buffer
- (let ((temp-buffer (current-buffer)))
- (when (with-current-buffer caller-buffer
- ;; Execute the command in the local buffer but output in the
temporal one.
- (/= 3 (process-file (company-gtags--executable) nil
- ;; "-T" goes through all the tag files
listed in GTAGSLIBPATH
- temp-buffer nil "-xGqT" (concat "^"
prefix))))
- (goto-char (point-min))
- (cl-loop while
- (re-search-forward (concat
- "^"
- "\\([^ ]*\\)" ;; completion
- "[ \t]+\\([[:digit:]]+\\)" ;; linum
- "[ \t]+\\([^ \t]+\\)" ;; file
- "[ \t]+\\(.*\\)" ;; definition
- "$"
- ) nil t)
- collect
- (propertize (match-string 1)
- 'meta (match-string 4)
- 'location (cons (expand-file-name (match-string
3))
- (string-to-number (match-string
2)))
- )))))))
+ (with-temp-buffer
+ (let (tags)
+ ;; For some reason Global v 6.6.3 is prone to returning exit status 1
+ ;; even on successful searches when '-T' is used.
+ (when (/= 3 (process-file company-gtags-executable nil
+ ;; "-T" goes through all the tag files listed
in GTAGSLIBPATH
+ (list (current-buffer) nil) nil "-xGqT" (concat
"^" prefix)))
+ (goto-char (point-min))
+ (cl-loop while
+ (re-search-forward (concat
+ "^"
+ "\\([^ ]*\\)" ;; completion
+ "[ \t]+\\([[:digit:]]+\\)" ;; linum
+ "[ \t]+\\([^ \t]+\\)" ;; file
+ "[ \t]+\\(.*\\)" ;; definition
+ "$"
+ ) nil t)
+ collect
+ (propertize (match-string 1)
+ 'meta (match-string 4)
+ 'location (cons (expand-file-name (match-string
3))
+ (string-to-number (match-string
2)))
+ ))))))
(defun company-gtags--annotation (arg)
(let ((meta (get-text-property 0 'meta arg)))
- [elpa] externals/company e6fa6c0 40/46: Add connection-local caching for gtags executable., (continued)
- [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
- [elpa] externals/company 053c50d 30/46: Merge pull request #1023 from hlissner/fix-face-helper, Dmitry Gutov, 2020/12/30
- [elpa] externals/company b16b236 32/46: Fall back to unremapped 'default face :background, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 123b604 46/46: Merge branch 'master' of https://github.com/company-mode/company-mode into externals/company, Dmitry Gutov, 2020/12/30
- [elpa] externals/company dccd04b 44/46: company-gtags--fetch-tags: Revert an earlier change,
Dmitry Gutov <=
- [elpa] externals/company 3a27fd9 43/46: company-gtags--executable: Don't create local values unnecessarily, Dmitry Gutov, 2020/12/30
- [elpa] externals/company d591282 25/46: Merge pull request #1009 from condy0919/cmake, Dmitry Gutov, 2020/12/30
- [elpa] externals/company 75acbc5 41/46: Merge pull request #1037 from Ergus/master, Dmitry Gutov, 2020/12/30