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

[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



reply via email to

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