[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 02/38: Give ggtags-show-definition-function full information
From: |
Leo Liu |
Subject: |
[elpa] 02/38: Give ggtags-show-definition-function full information |
Date: |
Mon, 24 Mar 2014 09:31:32 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 0dc9b57935b1b018a89253bd0a3f42e65dbbbc46
Author: Leo Liu <address@hidden>
Date: Mon Mar 3 18:09:33 2014 +0800
Give ggtags-show-definition-function full information
of the definition candidates.
---
ggtags.el | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index 542affe..b5dd77f 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -185,7 +185,11 @@ If an integer abbreviate only names longer than that
number."
(defcustom ggtags-show-definition-function #'ggtags-show-definition-default
"Function called by `ggtags-show-definition' to show definition.
-It is passed a list of definnition candidates."
+It is passed a list of definnition candidates of the form:
+
+ (TEXT NAME FILE LINE)
+
+where TEXT is usually the source line of the definition."
:type 'function
:group 'ggtags)
@@ -1319,7 +1323,7 @@ Invoke CALLBACK in BUFFER with process exit status when
finished."
(defun ggtags-show-definition-default (defs)
(let (message-log-max)
- (message "%s" (or (car defs) "[definition not found]"))))
+ (message "%s" (or (caar defs) "[definition not found]"))))
(defun ggtags-show-definition (name)
(interactive (list (ggtags-read-tag)))
@@ -1329,10 +1333,15 @@ Invoke CALLBACK in BUFFER with process exit status when
finished."
(show (lambda (_status)
(goto-char (point-min))
(funcall fn (loop while (re-search-forward re nil t)
- collect (buffer-substring (1+ (match-end 2))
-
(line-end-position))))
+ collect (list (buffer-substring (1+
(match-end 2))
+
(line-end-position))
+ name
+ (match-string 1)
+ (string-to-number
(match-string 2)))))
(kill-buffer buffer))))
- (ggtags-global-output (list "global" "--result=grep" name) buffer show
30)))
+ (ggtags-global-output
+ (list "global" "--result=grep" "--path-style=absolute" name)
+ buffer show 100)))
(defvar ggtags-mode-prefix-map
(let ((m (make-sparse-keymap)))
- [elpa] branch master updated (0601efd -> f11199d), Leo Liu, 2014/03/24
- [elpa] 02/38: Give ggtags-show-definition-function full information,
Leo Liu <=
- [elpa] 01/38: New command ggtags-show-definition, Leo Liu, 2014/03/24
- [elpa] 08/38: Call ggtags-show-definition-function in the original buffer, Leo Liu, 2014/03/24
- [elpa] 03/38: Don't display buffer if ggtags-navigation-mode is exited, Leo Liu, 2014/03/24
- [elpa] 07/38: Fix some errors in ggtags-global-output, Leo Liu, 2014/03/24
- [elpa] 04/38: Combine ggtags-global-column and tag name search, Leo Liu, 2014/03/24
- [elpa] 06/38: Fix #34: New variable ggtags-global-always-update, Leo Liu, 2014/03/24
- [elpa] 09/38: Replace ignore-errors with condition-case-unless-debug, Leo Liu, 2014/03/24
- [elpa] 10/38: Automatically use GTAGSCONF file at project root, Leo Liu, 2014/03/24
- [elpa] 05/38: Improve completion support for all tag types, Leo Liu, 2014/03/24
- [elpa] 11/38: Make last change acutally work, Leo Liu, 2014/03/24