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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 6293c43 06/11: Fix #156: handle tag names starting with `-


From: Leo Liu
Subject: [elpa] master 6293c43 06/11: Fix #156: handle tag names starting with `-'
Date: Wed, 25 Jul 2018 12:34:46 -0400 (EDT)

branch: master
commit 6293c438a4a7aae08b8f5dd5fc0082d3da0aa530
Author: Leo Liu <address@hidden>
Commit: Leo Liu <address@hidden>

    Fix #156: handle tag names starting with `-'
---
 README.rst | 7 +++++++
 ggtags.el  | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/README.rst b/README.rst
index 2f5d982..e10affb 100644
--- a/README.rst
+++ b/README.rst
@@ -314,6 +314,13 @@ Integration with other packages
 NEWS
 ~~~~
 
+(devel) 0.8.13
+++++++++++++++
+
+#. Don't choke on tag names start with ``-`` (`#156
+   <https://github.com/leoliu/ggtags/issues/156>`_).
+#. ``ggtags-show-definition`` supports ``ggtags-sort-by-nearness``.
+
 [2016-10-02 Sun] 0.8.12
 +++++++++++++++++++++++
 
diff --git a/ggtags.el b/ggtags.el
index 73d8f46..8a970a1 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -1022,7 +1022,7 @@ definition tags."
                 (funcall (if (ggtags-sort-by-nearness-p)
                              #'file-relative-name 
#'ggtags-project-relative-file)
                          buffer-file-name)))
-       (shell-quote-argument name)))))
+       "--" (shell-quote-argument name)))))
 
 (defun ggtags-find-tag-mouse (event)
   (interactive "e")
@@ -1034,7 +1034,7 @@ definition tags."
 ;; Another option for `M-.'.
 (defun ggtags-find-definition (name)
   (interactive (list (ggtags-read-tag 'definition current-prefix-arg)))
-  (ggtags-find-tag 'definition (shell-quote-argument name)))
+  (ggtags-find-tag 'definition "--" (shell-quote-argument name)))
 
 (defun ggtags-setup-libpath-search (type name)
   (pcase (and ggtags-global-search-libpath-for-reference
@@ -1056,13 +1056,13 @@ definition tags."
 (defun ggtags-find-reference (name)
   (interactive (list (ggtags-read-tag 'reference current-prefix-arg)))
   (ggtags-setup-libpath-search 'reference name)
-  (ggtags-find-tag 'reference (shell-quote-argument name)))
+  (ggtags-find-tag 'reference "--" (shell-quote-argument name)))
 
 (defun ggtags-find-other-symbol (name)
   "Find tag NAME that is a reference without a definition."
   (interactive (list (ggtags-read-tag 'symbol current-prefix-arg)))
   (ggtags-setup-libpath-search 'symbol name)
-  (ggtags-find-tag 'symbol (shell-quote-argument name)))
+  (ggtags-find-tag 'symbol "--" (shell-quote-argument name)))
 
 (defun ggtags-quote-pattern (pattern)
   (prin1-to-string (substring-no-properties pattern)))



reply via email to

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