[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 9d1ecf9 05/11: Consider `ggtags-sort-by-nearness` in `ggta
From: |
Leo Liu |
Subject: |
[elpa] master 9d1ecf9 05/11: Consider `ggtags-sort-by-nearness` in `ggtags-show-definition` |
Date: |
Wed, 25 Jul 2018 12:34:46 -0400 (EDT) |
branch: master
commit 9d1ecf961dd964cbe8ea183eac23572bb4f8f4ee
Author: Robbert van der Helm <address@hidden>
Commit: Leo Liu <address@hidden>
Consider `ggtags-sort-by-nearness` in `ggtags-show-definition`
`ggtags-show-definition` and `ggtags-find-definition` were showing
different results as `ggtags-show-definition` was always sorted
alphabetically. This also causes the eldoc prompt to show the wrong
definition.
---
ggtags.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index b3ab1f6..73d8f46 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -2077,6 +2077,7 @@ When finished invoke CALLBACK in BUFFER with process exit
status."
(let* ((re (cadr (assq 'grep ggtags-global-error-regexp-alist-alist)))
(current (current-buffer))
(buffer (get-buffer-create " *ggtags-definition*"))
+ (args (list "--result=grep" "--path-style=absolute" name))
;; Need these bindings so that let-binding
;; `ggtags-print-definition-function' can work see
;; `ggtags-eldoc-function'.
@@ -2096,8 +2097,8 @@ When finished invoke CALLBACK in BUFFER with process exit
status."
(ggtags-with-current-project
(ggtags-global-output
buffer
- (list (ggtags-program-path "global")
- "--result=grep" "--path-style=absolute" name)
+ (cons (ggtags-program-path "global")
+ (if (ggtags-sort-by-nearness-p) (cons "--nearness" args) args))
show 100))))
(defvar ggtags-mode-prefix-map
- [elpa] master updated (61bad71 -> 543fa78), Leo Liu, 2018/07/25
- [elpa] master 2149f3a 01/11: Ignore errors in ggtags-find-project even if debug-on-error, Leo Liu, 2018/07/25
- [elpa] master c794894 03/11: Merge pull request #146 from garyo/master, Leo Liu, 2018/07/25
- [elpa] master e043ddd 02/11: Strip CR as well as newline from subprocess output, Leo Liu, 2018/07/25
- [elpa] master 8579025 04/11: Remove delay-mode-hooks from ggtags-fontify-code, Leo Liu, 2018/07/25
- [elpa] master 9d1ecf9 05/11: Consider `ggtags-sort-by-nearness` in `ggtags-show-definition`,
Leo Liu <=
- [elpa] master 6293c43 06/11: Fix #156: handle tag names starting with `-', Leo Liu, 2018/07/25
- [elpa] master 25946d3 07/11: Implement #162: New variable ggtags-extra-args, Leo Liu, 2018/07/25
- [elpa] master eec392d 08/11: Fix #163: Incorrect use of --nearness option, Leo Liu, 2018/07/25
- [elpa] master bf263af 09/11: Use buffer-no-properties where applicable, Leo Liu, 2018/07/25
- [elpa] master 543fa78 11/11: Merge branch 'master' of github.com:leoliu/ggtags, Leo Liu, 2018/07/25
- [elpa] master 17a121a 10/11: Version 0.8.13, Leo Liu, 2018/07/25