[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master eec392d 08/11: Fix #163: Incorrect use of --nearness optio
From: |
Leo Liu |
Subject: |
[elpa] master eec392d 08/11: Fix #163: Incorrect use of --nearness option |
Date: |
Wed, 25 Jul 2018 12:34:47 -0400 (EDT) |
branch: master
commit eec392d2d639030c5a51bce8431f2815ad8e7bc5
Author: Leo Liu <address@hidden>
Commit: Leo Liu <address@hidden>
Fix #163: Incorrect use of --nearness option
---
README.rst | 1 +
ggtags.el | 17 +++++++----------
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/README.rst b/README.rst
index e133235..c429657 100644
--- a/README.rst
+++ b/README.rst
@@ -321,6 +321,7 @@ NEWS
<https://github.com/leoliu/ggtags/issues/156>`_).
#. ``ggtags-show-definition`` supports ``ggtags-sort-by-nearness``.
#. New variable ``ggtags-extra-args``.
+#. Unbreak ``ggtags-sort-by-nearness``.
[2016-10-02 Sun] 0.8.12
+++++++++++++++++++++++
diff --git a/ggtags.el b/ggtags.el
index e312fcc..4a35ea9 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -904,7 +904,7 @@ blocking emacs."
(defun ggtags-sort-by-nearness-p ()
(and ggtags-sort-by-nearness
- (ggtags-process-succeed-p "global" "--nearness" "--help")))
+ (ggtags-process-succeed-p "global" "--nearness=." "--help")))
(defun ggtags-global-build-command (cmd &rest args)
;; CMD can be definition, reference, symbol, grep, idutils
@@ -916,7 +916,7 @@ blocking emacs."
(ggtags-find-project)
(ggtags-project-has-color (ggtags-find-project))
"--color=always")
- (and (ggtags-sort-by-nearness-p) "--nearness")
+ (and (ggtags-sort-by-nearness-p) "--nearness=.")
(and (ggtags-find-project)
(ggtags-project-has-path-style
(ggtags-find-project))
"--path-style=shorter")
@@ -979,8 +979,7 @@ blocking emacs."
(defun ggtags-find-tag (cmd &rest args)
(ggtags-check-project)
- (ggtags-global-start (apply #'ggtags-global-build-command cmd args)
- (and (ggtags-sort-by-nearness-p) default-directory)))
+ (ggtags-global-start (apply #'ggtags-global-build-command cmd args)))
(defun ggtags-include-file ()
"Calculate the include file based on `ggtags-include-pattern'."
@@ -1023,12 +1022,10 @@ definition tags."
(t (ggtags-find-tag
(format "--from-here=%d:%s"
(line-number-at-pos)
+ ;; Note `ggtags-find-tag' binds `default-directory' to
+ ;; project root.
(shell-quote-argument
- ;; Note `ggtags-find-tag' may bind `default-directory'
- ;; to project root.
- (funcall (if (ggtags-sort-by-nearness-p)
- #'file-relative-name
#'ggtags-project-relative-file)
- buffer-file-name)))
+ (ggtags-project-relative-file buffer-file-name)))
"--" (shell-quote-argument name)))))
(defun ggtags-find-tag-mouse (event)
@@ -2105,7 +2102,7 @@ When finished invoke CALLBACK in BUFFER with process exit
status."
(ggtags-global-output
buffer
(cons (ggtags-program-path "global")
- (if (ggtags-sort-by-nearness-p) (cons "--nearness" args) args))
+ (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, 2018/07/25
- [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 <=
- [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