[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 07/38: Fix some errors in ggtags-global-output
From: |
Leo Liu |
Subject: |
[elpa] 07/38: Fix some errors in ggtags-global-output |
Date: |
Mon, 24 Mar 2014 09:31:33 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 1702db56a16ec3b12665bb412714503f06a14dbe
Author: Leo Liu <address@hidden>
Date: Wed Mar 5 11:56:18 2014 +0800
Fix some errors in ggtags-global-output
---
ggtags.el | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index 0fe7cae..fd0f195 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -1311,17 +1311,16 @@ Global and Emacs."
(process-file "global" nil 0 nil "--single-update"
(file-relative-name buffer-file-name))))))
-(defun ggtags-global-output (cmds buffer callback &optional cutoff)
- "Asynchrously pipe the output of CMDS to BUFFER.
-Invoke CALLBACK in BUFFER with process exit status when finished."
+(defun ggtags-global-output (buffer cmds callback &optional cutoff)
+ "Asynchrously pipe the output of running CMDS to BUFFER.
+When finished invoke CALLBACK in BUFFER with process exit status."
(or buffer (error "Output buffer required"))
- (let* ((default-directory (or (ggtags-current-project-root)
default-directory))
- (program (car cmds))
+ (let* ((program (car cmds))
(args (cdr cmds))
- (cutoff (+ cutoff (if (get-buffer buffer)
- (with-current-buffer buffer
- (line-number-at-pos (point-max)))
- 0)))
+ (cutoff (and cutoff (+ cutoff (if (get-buffer buffer)
+ (with-current-buffer buffer
+ (line-number-at-pos (point-max)))
+ 0))))
(proc (apply #'start-file-process program buffer program args))
(filter (lambda (proc string)
(and (buffer-live-p (process-buffer proc))
@@ -1335,7 +1334,7 @@ Invoke CALLBACK in BUFFER with process exit status when
finished."
(when (memq (process-status proc) '(exit signal))
(with-current-buffer (process-buffer proc)
(set-process-buffer proc nil)
- (funcall callback (process-status proc)))))))
+ (funcall callback (process-exit-status proc)))))))
(set-process-query-on-exit-flag proc nil)
(and cutoff (set-process-filter proc filter))
(set-process-sentinel proc sentinel)
@@ -1347,8 +1346,9 @@ Invoke CALLBACK in BUFFER with process exit status when
finished."
(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)))
- (buffer (get-buffer-create " *ggtags-output*"))
+ (buffer (get-buffer-create " *ggtags-definition*"))
(fn ggtags-show-definition-function)
(show (lambda (_status)
(goto-char (point-min))
@@ -1360,8 +1360,9 @@ Invoke CALLBACK in BUFFER with process exit status when
finished."
(string-to-number
(match-string 2)))))
(kill-buffer buffer))))
(ggtags-global-output
+ buffer
(list "global" "--result=grep" "--path-style=absolute" name)
- buffer show 100)))
+ 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, 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, 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 <=
- [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
- [elpa] 22/38: New command ggtags-navigation-isearch-forward, Leo Liu, 2014/03/24
- [elpa] 17/38: Fix ggtags-with-current-project to include GTAGSCONF, Leo Liu, 2014/03/24