[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 02/09: New command ggtags-visit-project-root using key C-c M-j
From: |
Leo Liu |
Subject: |
[elpa] 02/09: New command ggtags-visit-project-root using key C-c M-j |
Date: |
Tue, 25 Feb 2014 08:45:57 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 77c46fd331d273223d65ca905aacfaf87ef0c552
Author: Leo Liu <address@hidden>
Date: Mon Feb 24 14:38:30 2014 +0800
New command ggtags-visit-project-root using key C-c M-j
Initialise ggtags-project-root to 'unset so that
ggtags-highlight-tag-at-point is run automatically.
Remove all compiler warnings for emacs 24.1-trunk.
---
ggtags.el | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index e297ecb..e9bf7f3 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -60,6 +60,7 @@
(require 'compile)
(require 'etags)
+(require 'tabulated-list) ;preloaded since 24.3
(eval-when-compile
(unless (fboundp 'setq-local)
@@ -114,7 +115,7 @@ automatically switches to 'global --single-update'."
Elements are run through `substitute-env-vars' before use.
GTAGSROOT will always be expanded to current project root
directory. This is intended for project-wise ggtags-specific
-process environment settings. Note on remote host (e.g. tramp)
+process environment settings. Note on remote hosts (e.g. tramp)
directory local variables is not enabled by default per
`enable-remote-dir-locals' (which see)."
:safe 'ggtags-list-of-string-p
@@ -310,7 +311,7 @@ properly update `ggtags-mode-map'."
(size (when-let (project (or project (ggtags-find-project)))
(> (ggtags-project-tag-size project) size)))))
-(defvar-local ggtags-project-root nil
+(defvar-local ggtags-project-root 'unset
"Internal variable for project root directory.")
;;;###autoload
@@ -359,6 +360,8 @@ properly update `ggtags-mode-map'."
;; in any directory.
(ggtags-check-project))))
+(defvar delete-trailing-lines) ;new in 24.3
+
(defun ggtags-save-project-settings (&optional noconfirm)
"Save Gnu Global's specific environment variables."
(interactive "P")
@@ -412,6 +415,11 @@ properly update `ggtags-mode-map'."
(message "Project read-only-mode is %s" (if val "on" "off")))
val))
+(defun ggtags-visit-project-root ()
+ (interactive)
+ (ggtags-check-project)
+ (dired (ggtags-current-project-root)))
+
(defmacro ggtags-with-current-project (&rest body)
"Eval BODY in current project's `process-environment'."
(declare (debug t))
@@ -998,6 +1006,8 @@ Global and Emacs."
(2 'compilation-error nil t))
("^Global found \\([0-9]+\\)" (1 compilation-info-face))))
+(defvar compilation-always-kill) ;new in 24.3
+
(define-compilation-mode ggtags-global-mode "Global"
"A mode for showing outputs from gnu global."
;; Make it buffer local for `ggtags-abbreviate-files'.
@@ -1235,6 +1245,7 @@ Global and Emacs."
(define-key m "\M-b" 'ggtags-browse-file-as-hypertext)
(define-key m "\M-k" 'ggtags-kill-file-buffers)
(define-key m "\M-h" 'ggtags-view-tag-history)
+ (define-key m "\M-j" 'ggtags-visit-project-root)
(define-key m (kbd "M-%") 'ggtags-query-replace)
m))
@@ -1262,6 +1273,8 @@ Global and Emacs."
(define-key menu [toggle-read-only]
'(menu-item "Toggle project read-only" ggtags-toggle-project-read-only
:button (:toggle . buffer-read-only)))
+ (define-key menu [visit-project-root]
+ '(menu-item "Visit project root" ggtags-visit-project-root))
(define-key menu [sep2] menu-bar-separator)
(define-key menu [browse-hypertext]
'(menu-item "Browse as hypertext" ggtags-browse-file-as-hypertext
- [elpa] branch master updated (fbed521 -> 3b4b504), Leo Liu, 2014/02/25
- [elpa] 01/09: Be defensive in ggtags-find-project, Leo Liu, 2014/02/25
- [elpa] 03/09: Don't let deleting text screw up compilation-filter-start, Leo Liu, 2014/02/25
- [elpa] 07/09: Fix error: GTAGSCONF must be absolute path name, Leo Liu, 2014/02/25
- [elpa] 04/09: Avoid "--regexp" and use "--" instead, Leo Liu, 2014/02/25
- [elpa] 08/09: New hook ggtags-global-next-error-hook, Leo Liu, 2014/02/25
- [elpa] 02/09: New command ggtags-visit-project-root using key C-c M-j,
Leo Liu <=
- [elpa] 09/09: Merge remote-tracking branch 'ggtags/master', Leo Liu, 2014/02/25
- [elpa] 06/09: Fix ggtags-highlight-tag-map to avoid 'undefined' error, Leo Liu, 2014/02/25
- [elpa] 05/09: Make use of colored output to calulate column, Leo Liu, 2014/02/25