branch: master commit 4ce9914018f39a09406068c99e2306b0281479a3 Author: Leo Liu <sdl....@gmail.com> Commit: Leo Liu <sdl....@gmail.com>
Teach ggtags-visit-project-root to visit past projects --- README.rst | 5 +++++ ggtags.el | 15 ++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 832d74f..409b09a 100644 --- a/README.rst +++ b/README.rst @@ -308,6 +308,11 @@ Integration with other packages NEWS ~~~~ +(devel) 0.8.9 ++++++++++++++ + +#. ``ggtags-visit-project-root`` can visit past projects. + [2014-12-03 Wed] 0.8.8 ++++++++++++++++++++++ diff --git a/ggtags.el b/ggtags.el index 52081c9..9e45a6f 100644 --- a/ggtags.el +++ b/ggtags.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2013-2014 Free Software Foundation, Inc. ;; Author: Leo Liu <sdl....@gmail.com> -;; Version: 0.8.8 +;; Version: 0.8.9 ;; Keywords: tools, convenience ;; Created: 2013-01-29 ;; URL: https://github.com/leoliu/ggtags @@ -608,10 +608,15 @@ Value is new modtime if updated." (message "Project read-only-mode is %s" (if val "on" "off"))) val)) -(defun ggtags-visit-project-root () - (interactive) - (ggtags-ensure-project) - (dired (ggtags-current-project-root))) +(defun ggtags-visit-project-root (&optional project) + "Visit the root directory of (current) PROJECT in dired. +When called with a prefix \\[universal-argument], choose from past projects." + (interactive (list (and current-prefix-arg + (completing-read "Project: " ggtags-projects)))) + (dired (cl-typecase project + (string project) + (ggtags-project (ggtags-project-root project)) + (t (ggtags-ensure-project) (ggtags-current-project-root))))) (defmacro ggtags-with-current-project (&rest body) "Eval BODY in current project's `process-environment'."