emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ELPA-diffs] /srv/bzr/emacs/elpa r375: * ggtags.el: Release v0.6.3


From: Leo Liu
Subject: [ELPA-diffs] /srv/bzr/emacs/elpa r375: * ggtags.el: Release v0.6.3
Date: Thu, 28 Mar 2013 10:53:02 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 375
committer: Leo Liu <address@hidden>
branch nick: elpa
timestamp: Thu 2013-03-28 10:53:02 +0800
message:
  * ggtags.el: Release v0.6.3
  
  - handle buffers not visiting files more gracefully
  - give higher priority to ggtags-navigation-mode
    or modes such as view-mode may shadow its key bindings.
removed:
  packages/ggtags/README
modified:
  packages/ggtags/ggtags.el
=== removed file 'packages/ggtags/README'
--- a/packages/ggtags/README    2013-02-02 15:38:27 +0000
+++ b/packages/ggtags/README    1970-01-01 00:00:00 +0000
@@ -1,22 +0,0 @@
-Type `M-x ggtags-mode' to enable the minor mode, or as usual enable it
-in your desired major mode hooks. When the mode is on the symbol at
-point is underlined if it is a valid tag.
-
-`M-.' finds definitions or references according to the tag at point,
-i.e. if point is at a definition tag find references and vice versa.
-`C-u M-.' is verbose and will ask you the name - with completion - and
-the type of tag to search.
-
-If multiple matches are found, navigation mode is entered. In this
-mode, `M-n' and `M-p' moves to next and previous match, `M-}' and
-`M-{' to next and previous file respectively. `M-o' toggles between
-full and abbreviated displays of file names in the auxiliary popup
-window. When you locate the right match, press RET to finish which
-hides the auxiliary window and exits navigation mode. You can resume
-the search using `M-,'. To abort the search press `M-*'.
-
-Normally after a few searches a dozen buffers are created visiting
-files tracked by GNU Global. `C-c M-k' helps clean them up.
-
-Bugs:
-https://github.com/leoliu/ggtags/issues

=== modified file 'packages/ggtags/ggtags.el'
--- a/packages/ggtags/ggtags.el 2013-03-21 07:16:18 +0000
+++ b/packages/ggtags/ggtags.el 2013-03-28 02:53:02 +0000
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.6.2
+;; Version: 0.6.3
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -23,8 +23,30 @@
 
 ;;; Commentary:
 
-;; Use GNU Global source code tagging system in Emacs.
-;; http://www.gnu.org/software/global
+;; A package to integrate GNU Global source code tagging system
+;; (http://www.gnu.org/software/global) with Emacs.
+;;
+;; Usage:
+;;
+;; Type `M-x ggtags-mode' to enable the minor mode, or as usual enable
+;; it in your desired major mode hooks. When the mode is on the symbol
+;; at point is underlined if it is a valid (definition) tag.
+;;
+;; `M-.' finds definition or references according to the context at
+;; point, i.e. if point is at a definition tag find references and
+;; vice versa. `C-u M-.' is verbose and will ask you the name - with
+;; completion - and the type of tag to search.
+;;
+;; If multiple matches are found, navigation mode is entered. In this
+;; mode, `M-n' and `M-p' moves to next and previous match, `M-}' and
+;; `M-{' to next and previous file respectively. `M-o' toggles between
+;; full and abbreviated displays of file names in the auxiliary popup
+;; window. When you locate the right match, press RET to finish which
+;; hides the auxiliary window and exits navigation mode. You can
+;; resume the search using `M-,'. To abort the search press `M-*'.
+;;
+;; Normally after a few searches a dozen buffers are created visiting
+;; files tracked by GNU Global. `C-c M-k' helps clean them up.
 
 ;;; Code:
 
@@ -217,10 +239,10 @@
          (lambda (w) (split-window (frame-root-window w))))
         (default-directory (ggtags-root-directory)))
     (compilation-start
-     (if verbose
+     (if (or verbose (not buffer-file-name))
          (format "global %s %s \"%s\""
                  ggtags-global-options
-                 (if (y-or-n-p "Kind (y for definition n for reference)? ")
+                 (if (y-or-n-p "Find definition (n for reference)? ")
                      "" "-r")
                  name)
        (format "global %s --from-here=%d:%s \"%s\""
@@ -457,8 +479,9 @@
   (if ggtags-mode
       (progn
         (add-hook 'after-save-hook 'ggtags-after-save-function nil t)
-        (when (executable-find "global")
-          (add-hook 'post-command-hook 'ggtags-post-command-function nil t)))
+        (if (executable-find "global")
+            (add-hook 'post-command-hook 'ggtags-post-command-function nil t)
+          (message "Failed to find GNU Global")))
     (remove-hook 'after-save-hook 'ggtags-after-save-function t)
     (remove-hook 'post-command-hook 'ggtags-post-command-function t)
     (and (overlayp ggtags-tag-overlay)
@@ -514,5 +537,14 @@
       (setq he-expand-list (cdr he-expand-list))
       t)))
 
+;;; Finish up
+
+;; Higher priority for `ggtags-navigation-mode' to avoid being
+;; hijacked by modes such as `view-mode'.
+(defvar ggtags-mode-map-alist
+  `((ggtags-navigation-mode . ,ggtags-navigation-mode-map)))
+
+(add-to-list 'emulation-mode-map-alists 'ggtags-mode-map-alist)
+
 (provide 'ggtags)
 ;;; ggtags.el ends here


reply via email to

[Prev in Thread] Current Thread [Next in Thread]