[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 03/14: Change ggtags-read-tag to completing-read when no default
From: |
Leo Liu |
Subject: |
[elpa] 03/14: Change ggtags-read-tag to completing-read when no default |
Date: |
Sun, 30 Mar 2014 07:02:38 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 27c703776ef97416c64b9c2bab854f92f3252b37
Author: Leo Liu <address@hidden>
Date: Wed Mar 26 16:10:47 2014 +0800
Change ggtags-read-tag to completing-read when no default
Shell-quote NAME to ggtags-find-tag-dwim, ggtags-find-reference and
ggtags-find-other-symbol.
---
ggtags.el | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index 031cb3e..81d807a 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -634,9 +634,8 @@ Do nothing if GTAGS exceeds the oversize limit unless
FORCE."
(completing-read
(format (if default "%s (default %s): " "%s: ") prompt
default)
ggtags-completion-table nil require-match nil nil default))
- ((not default)
- (user-error "No tag at point"))
- (t (substring-no-properties default))))))
+ (default (substring-no-properties default))
+ (t (ggtags-read-tag type t prompt require-match default))))))
(defun ggtags-global-build-command (cmd &rest args)
;; CMD can be definition, reference, symbol, grep, idutils
@@ -738,7 +737,7 @@ definition tags."
(not buffer-file-name)
(and (ggtags-find-project)
(not (ggtags-project-has-refs (ggtags-find-project)))))
- (ggtags-find-tag 'definition name))
+ (ggtags-find-tag 'definition (shell-quote-argument name)))
(t (ggtags-find-tag
(format "--from-here=%d:%s"
(line-number-at-pos)
@@ -751,16 +750,16 @@ definition tags."
buffer-file-name)
(ggtags-current-project-root)
(locate-dominating-file buffer-file-name "GTAGS")))))
- name))))
+ (shell-quote-argument name)))))
(defun ggtags-find-reference (name)
(interactive (list (ggtags-read-tag 'reference current-prefix-arg)))
- (ggtags-find-tag 'reference 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-find-tag 'symbol name))
+ (ggtags-find-tag 'symbol (shell-quote-argument name)))
(defun ggtags-quote-pattern (pattern)
(prin1-to-string (substring-no-properties pattern)))
- [elpa] branch master updated (b8924f8 -> 3dc7169), Leo Liu, 2014/03/30
- [elpa] 03/14: Change ggtags-read-tag to completing-read when no default,
Leo Liu <=
- [elpa] 02/14: Fix #12: Remove ggtags-completing-read-function, Leo Liu, 2014/03/30
- [elpa] 04/14: Fix ggtags-try-complete-tag to use ggtags-bounds-of-tag-function, Leo Liu, 2014/03/30
- [elpa] 05/14: Fix #42: Clear ggtags-project-root in non-file buffers, Leo Liu, 2014/03/30
- [elpa] 01/14: Enhance ggtags-view-tag-history to use next-/previous-error, Leo Liu, 2014/03/30
- [elpa] 06/14: New user variable ggtags-global-use-color, Leo Liu, 2014/03/30
- [elpa] 08/14: Fix warning: Making variable buffer-local while let-bound!, Leo Liu, 2014/03/30
- [elpa] 10/14: Disable ggtags-navigation-mode at the right time, Leo Liu, 2014/03/30
- [elpa] 13/14: Fix #44: New variable ggtags-enable-navigation-keys, Leo Liu, 2014/03/30
- [elpa] 09/14: Use compilation-auto-jump in ggtags-global-filter, Leo Liu, 2014/03/30
- [elpa] 11/14: Rename ggtags-handle-single-match to ggtags-global-handle-exit, Leo Liu, 2014/03/30