[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 08/38: Call ggtags-show-definition-function in the original buffe
From: |
Leo Liu |
Subject: |
[elpa] 08/38: Call ggtags-show-definition-function in the original buffer |
Date: |
Mon, 24 Mar 2014 09:31:33 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 22bca183cd838933690e7bc668886073036d63b9
Author: Leo Liu <address@hidden>
Date: Thu Mar 6 01:14:09 2014 +0800
Call ggtags-show-definition-function in the original buffer
---
ggtags.el | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index fd0f195..1ed2846 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -1342,23 +1342,27 @@ When finished invoke CALLBACK in BUFFER with process
exit status."
(defun ggtags-show-definition-default (defs)
(let (message-log-max)
- (message "%s" (or (caar defs) "[definition not found]"))))
+ (message "%s%s" (or (caar defs) "[definition not found]")
+ (if (cdr defs) " [guess]" ""))))
(defun ggtags-show-definition (name)
(interactive (list (ggtags-read-tag 'definition current-prefix-arg)))
(ggtags-check-project)
(let* ((re (cadr (assq 'grep ggtags-global-error-regexp-alist-alist)))
+ (current (current-buffer))
(buffer (get-buffer-create " *ggtags-definition*"))
(fn ggtags-show-definition-function)
(show (lambda (_status)
(goto-char (point-min))
- (funcall fn (loop while (re-search-forward re nil t)
+ (let ((defs (loop while (re-search-forward re nil t)
collect (list (buffer-substring (1+
(match-end 2))
(line-end-position))
name
(match-string 1)
- (string-to-number
(match-string 2)))))
- (kill-buffer buffer))))
+ (string-to-number
(match-string 2))))))
+ (kill-buffer buffer)
+ (with-current-buffer current
+ (funcall fn defs))))))
(ggtags-global-output
buffer
(list "global" "--result=grep" "--path-style=absolute" name)
- [elpa] branch master updated (0601efd -> f11199d), Leo Liu, 2014/03/24
- [elpa] 02/38: Give ggtags-show-definition-function full information, Leo Liu, 2014/03/24
- [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 <=
- [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
- [elpa] 12/38: Fix compatibility for locate-dominating-file, Leo Liu, 2014/03/24
- [elpa] 14/38: Display project root directory name on mode-line, Leo Liu, 2014/03/24