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

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

[ELPA-diffs] ELPA branch, master, updated. fcca4e12b3376d19c55d3290fd976


From: Stefan Monnier
Subject: [ELPA-diffs] ELPA branch, master, updated. fcca4e12b3376d19c55d3290fd976ab342faa238
Date: Wed, 21 Aug 2013 19:39:53 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ELPA".

The branch, master has been updated
       via  fcca4e12b3376d19c55d3290fd976ab342faa238 (commit)
       via  26d31f98bb529d036b7235de89c2af2a21a8da48 (commit)
       via  4a05529a6d9721805732538db8c41790dd96d7a0 (commit)
       via  f1409ce5e97e6a0391cc2efe7ba257ec76113930 (commit)
       via  c4cc459f97ea70ab3fb4a1a89dd16964c931f275 (commit)
       via  0baa24510c48e21e014cd252f5ca724d6386434f (commit)
       via  7b801add8ae0da34a78960739be36aab703867b7 (commit)
       via  b32c985e677a5408476333481c2a2bedd4856b6a (commit)
       via  b5ad48df54975e3857b150456bb8b313be899da1 (commit)
      from  7ee028f7e9bb11a80501ed23714cd4aeb7116756 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fcca4e12b3376d19c55d3290fd976ab342faa238
Merge: 7ee028f 26d31f9
Author: Stefan Monnier <address@hidden>
Date:   Wed Aug 21 15:39:31 2013 -0400

    Sync from ggtags/master


commit 26d31f98bb529d036b7235de89c2af2a21a8da48
Author: Leo Liu <address@hidden>
Date:   Mon Jul 29 11:00:16 2013 +0800

    Fix #14: Override key [return] in ggtags-navigation-mode-map

diff --git a/ggtags.el b/ggtags.el
index b344555..3f77656 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -532,6 +532,7 @@ s: symbols              (-s)
     (define-key map "\M-}" 'ggtags-navigation-next-file)
     (define-key map "\M-{" 'ggtags-navigation-previous-file)
     (define-key map "\M-o" 'ggtags-navigation-visible-mode)
+    (define-key map [return] 'ggtags-navigation-mode-done)
     (define-key map "\r" 'ggtags-navigation-mode-done)
     ;; Intercept M-. and M-* keys
     (define-key map [remap pop-tag-mark] 'ggtags-navigation-mode-abort)

commit 4a05529a6d9721805732538db8c41790dd96d7a0
Author: Leo Liu <address@hidden>
Date:   Fri Jul 5 09:07:30 2013 +0800

    Make use of --color if available

diff --git a/ggtags.el b/ggtags.el
index a422f4a..b344555 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -133,11 +133,15 @@ If nil, use Emacs default."
 ;; http://thread.gmane.org/gmane.comp.gnu.global.bugs/1518
 (defvar ggtags-global-has-path-style    ; introduced in global 6.2.8
   (with-demoted-errors                  ; in case `global' not found
-    (and (string-match-p "^--path-style "
-                         (shell-command-to-string "global --help"))
-         t))
+    (zerop (call-process "global" nil nil nil
+                         "--path-style" "shorter" "--help")))
   "Non-nil if `global' supports --path-style switch.")
 
+;; http://thread.gmane.org/gmane.comp.gnu.global.bugs/1542
+(defvar ggtags-global-has-color         ; introduced in global 6.2.9
+  (with-demoted-errors
+    (zerop (call-process "global" nil nil nil "--color" "--help"))))
+
 (defmacro ggtags-ensure-global-buffer (&rest body)
   (declare (indent 0))
   `(progn
@@ -264,6 +268,7 @@ Return -1 if it does not exist."
 (defun ggtags-global-options ()
   (concat "-v --result="
           (symbol-name ggtags-global-output-format)
+          (and ggtags-global-has-color " --color")
           (and ggtags-global-has-path-style " --path-style=shorter")))
 
 ;;;###autoload
@@ -475,6 +480,10 @@ s: symbols              (-s)
                    (get-text-property (match-beginning sub) 
'compilation-message))
           (ggtags-abbreviate-file (match-beginning sub) (match-end sub)))))))
 
+(defun ggtags-global-filter ()
+  "Called from `compilation-filter-hook' (which see)."
+  (ansi-color-apply-on-region compilation-filter-start (point)))
+
 (defun ggtags-handle-single-match (buf _how)
   (when (and ggtags-auto-jump-to-first-match
              ;; If exit abnormally keep the window for inspection.
@@ -512,6 +521,7 @@ s: symbols              (-s)
               'ggtags-global-exit-message-function)
   (setq-local truncate-lines t)
   (jit-lock-register #'ggtags-abbreviate-files)
+  (add-hook 'compilation-filter-hook 'ggtags-global-filter nil 'local)
   (add-hook 'compilation-finish-functions 'ggtags-handle-single-match nil t)
   (define-key ggtags-global-mode-map "o" 'visible-mode))
 

commit f1409ce5e97e6a0391cc2efe7ba257ec76113930
Author: Leo Liu <address@hidden>
Date:   Wed Jun 12 13:31:58 2013 +0800

    Improve ggtags-next-mark

diff --git a/ggtags.el b/ggtags.el
index a9b5b46..a422f4a 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -390,14 +390,15 @@ s: symbols              (-s)
 (defun ggtags-next-mark (&optional arg)
   "Move to the next mark in the tag marker ring."
   (interactive)
-  (or (<= (ring-length find-tag-marker-ring) 1)
+  (or (> (ring-length find-tag-marker-ring) 1)
       (user-error "No %s mark" (if arg "previous" "next")))
   (let ((mark (or (and ggtags-current-mark
+                       (marker-buffer ggtags-current-mark)
                        (funcall (if arg #'ring-previous #'ring-next)
                                 find-tag-marker-ring ggtags-current-mark))
-                  (ring-ref find-tag-marker-ring
-                            (funcall (if arg #'ring-minus1 #'ring-plus1)
-                                     0 (ring-length find-tag-marker-ring))))))
+                  (progn
+                    (ring-insert find-tag-marker-ring (point-marker))
+                    (ring-ref find-tag-marker-ring 0)))))
     (switch-to-buffer (marker-buffer mark))
     (goto-char mark)
     (setq ggtags-current-mark mark)))

commit c4cc459f97ea70ab3fb4a1a89dd16964c931f275
Author: Leo Liu <address@hidden>
Date:   Tue Jun 11 14:04:36 2013 +0800

    Add commands to move to next and previous marker

diff --git a/ggtags.el b/ggtags.el
index 7ce6389..a9b5b46 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -385,6 +385,27 @@ s: symbols              (-s)
           (when (window-live-p win)
             (quit-window t win)))))))
 
+(defvar ggtags-current-mark nil)
+
+(defun ggtags-next-mark (&optional arg)
+  "Move to the next mark in the tag marker ring."
+  (interactive)
+  (or (<= (ring-length find-tag-marker-ring) 1)
+      (user-error "No %s mark" (if arg "previous" "next")))
+  (let ((mark (or (and ggtags-current-mark
+                       (funcall (if arg #'ring-previous #'ring-next)
+                                find-tag-marker-ring ggtags-current-mark))
+                  (ring-ref find-tag-marker-ring
+                            (funcall (if arg #'ring-minus1 #'ring-plus1)
+                                     0 (ring-length find-tag-marker-ring))))))
+    (switch-to-buffer (marker-buffer mark))
+    (goto-char mark)
+    (setq ggtags-current-mark mark)))
+
+(defun ggtags-prev-mark ()
+  (interactive)
+  (ggtags-next-mark 'previous))
+
 (defvar-local ggtags-global-exit-status nil)
 
 (defun ggtags-global-exit-message-function (_process-status exit-status msg)

commit 0baa24510c48e21e014cd252f5ca724d6386434f
Author: Leo Liu <address@hidden>
Date:   Mon Jun 10 10:21:52 2013 +0800

    Don't cache nil value for ggtags-root-directory

diff --git a/ggtags.el b/ggtags.el
index 41b9bf4..7ce6389 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -193,18 +193,17 @@ Return -1 if it does not exist."
   (> (ggtags-get-timestamp key)
      (or (fourth (ggtags-cache-get key)) 0)))
 
-(defvar-local ggtags-root-directory 'unset
+(defvar-local ggtags-root-directory nil
   "Internal; use function `ggtags-root-directory' instead.")
 
 ;;;###autoload
 (defun ggtags-root-directory ()
-  (if (string-or-null-p ggtags-root-directory)
-      ggtags-root-directory
-    (setq ggtags-root-directory
-          (with-temp-buffer
-            (when (zerop (call-process "global" nil (list t nil) nil "-pr"))
-              (file-name-as-directory
-               (comment-string-strip (buffer-string) t t)))))))
+  (or ggtags-root-directory
+      (setq ggtags-root-directory
+            (with-temp-buffer
+              (when (zerop (call-process "global" nil (list t nil) nil "-pr"))
+                (file-name-as-directory
+                 (comment-string-strip (buffer-string) t t)))))))
 
 (defun ggtags-check-root-directory ()
   (or (ggtags-root-directory) (error "File GTAGS not found")))
@@ -221,7 +220,6 @@ Return -1 if it does not exist."
                     (or (zerop (call-process "gtags" nil t))
                         (error "%s" (comment-string-strip
                                      (buffer-string) t t)))))
-            (kill-local-variable 'ggtags-root-directory)
             (message "File GTAGS generated in `%s'"
                      (ggtags-root-directory)))))))
 

commit 7b801add8ae0da34a78960739be36aab703867b7
Author: Leo Liu <address@hidden>
Date:   Sat Jun 8 16:32:07 2013 +0800

    Fix last change

diff --git a/ggtags.el b/ggtags.el
index c4aabc6..41b9bf4 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -97,8 +97,10 @@ If nil, use Emacs default."
   :group 'ggtags)
 
 (defcustom ggtags-oversize-limit (* 50 1024 1024)
-  "The size limit for the  GTAGS file."
-  :type 'number
+  "The over size limit for the  GTAGS file."
+  :type '(choice (const :tag "None" nil)
+                 (const :tag "Always" t)
+                 number)
   :group 'ggtags)
 
 (defcustom ggtags-split-window-function split-window-preferred-function
@@ -631,7 +633,7 @@ s: symbols              (-s)
     (let* ((bounds (bounds-of-thing-at-point 'symbol))
            (valid-tag (when bounds
                         (member (buffer-substring (car bounds) (cdr bounds))
-                                (ggtags-tag-names nil (ggtags-oversize-p)))))
+                                (ggtags-tag-names (ggtags-oversize-p)))))
            (o ggtags-tag-overlay)
            (done-p (lambda ()
                      (and (memq o (overlays-at (car bounds)))

commit b32c985e677a5408476333481c2a2bedd4856b6a
Author: Leo Liu <address@hidden>
Date:   Sat Jun 8 13:05:11 2013 +0800

    Fix #3: Work efficiently when GTAGS is too large

diff --git a/ggtags.el b/ggtags.el
index 181f2ec..c4aabc6 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -96,6 +96,11 @@ If nil, use Emacs default."
                  integer)
   :group 'ggtags)
 
+(defcustom ggtags-oversize-limit (* 50 1024 1024)
+  "The size limit for the  GTAGS file."
+  :type 'number
+  :group 'ggtags)
+
 (defcustom ggtags-split-window-function split-window-preferred-function
   "A function to control how ggtags pops up the auxiliary window."
   :type 'function
@@ -140,6 +145,16 @@ If nil, use Emacs default."
          (error "No global buffer found"))
      (with-current-buffer compilation-last-buffer ,@body)))
 
+(defun ggtags-oversize-p ()
+  (pcase ggtags-oversize-limit
+    (`nil nil)
+    (`t t)
+    (t (when (ggtags-root-directory)
+         (> (or (nth 7 (file-attributes
+                        (expand-file-name "GTAGS" (ggtags-root-directory))))
+                0)
+            ggtags-oversize-limit)))))
+
 (defun ggtags-get-timestamp (root)
   "Get the timestamp (float) of file GTAGS in ROOT directory.
 Return -1 if it does not exist."
@@ -208,26 +223,29 @@ Return -1 if it does not exist."
             (message "File GTAGS generated in `%s'"
                      (ggtags-root-directory)))))))
 
-(defun ggtags-tag-names-1 (root &optional prefix)
+(defun ggtags-tag-names-1 (root &optional from-cache)
   (when root
-    (if (ggtags-cache-stale-p root)
+    (if (and (not from-cache) (ggtags-cache-stale-p root))
         (let* ((default-directory (file-name-as-directory root))
                (tags (with-demoted-errors
-                       (process-lines "global" "-c" (or prefix "")))))
+                       (process-lines "global" "-c" ""))))
           (and tags (ggtags-cache-set root tags))
           tags)
       (cadr (ggtags-cache-get root)))))
 
 ;;;###autoload
-(defun ggtags-tag-names (&optional prefix)
-  "Get a list of tag names starting with PREFIX."
+(defun ggtags-tag-names (&optional from-cache)
+  "Get a list of tag names."
   (let ((root (ggtags-root-directory)))
-    (when (and root (ggtags-cache-dirty-p root))
+    (when (and root
+               (not (ggtags-oversize-p))
+               (not from-cache)
+               (ggtags-cache-dirty-p root))
       (if (zerop (call-process "global" nil nil nil "-u"))
           (ggtags-cache-mark-dirty root nil)
         (message "ggtags: error running 'global -u'")))
     (apply 'append (mapcar (lambda (r)
-                             (ggtags-tag-names-1 r prefix))
+                             (ggtags-tag-names-1 r from-cache))
                            (cons root (ggtags-get-libpath))))))
 
 (defun ggtags-read-tag (quick)
@@ -238,7 +256,10 @@ Return -1 if it does not exist."
           (if quick (or default (user-error "No tag at point"))
             (completing-read
              (format (if default "Tag (default %s): " "Tag: ") default)
-             (ggtags-tag-names) nil t nil nil default)))))
+             ;; XXX: build tag names more lazily such as using
+             ;; `completion-table-dynamic'.
+             (ggtags-tag-names)
+             nil t nil nil default)))))
 
 (defun ggtags-global-options ()
   (concat "-v --result="
@@ -570,7 +591,14 @@ s: symbols              (-s)
 
 (defun ggtags-after-save-function ()
   (let ((root (with-demoted-errors (ggtags-root-directory))))
-    (and root (ggtags-cache-mark-dirty root t))))
+    (when root
+      (ggtags-cache-mark-dirty root t)
+      ;; When oversize update on a per-save basis.
+      (when (and buffer-file-name (ggtags-oversize-p))
+        (with-demoted-errors
+          (call-process "global" nil 0 nil
+                        "--single-update"
+                        (file-truename buffer-file-name)))))))
 
 (defvar ggtags-tag-overlay nil)
 (defvar ggtags-highlight-tag-timer nil)
@@ -603,7 +631,7 @@ s: symbols              (-s)
     (let* ((bounds (bounds-of-thing-at-point 'symbol))
            (valid-tag (when bounds
                         (member (buffer-substring (car bounds) (cdr bounds))
-                                (ggtags-tag-names))))
+                                (ggtags-tag-names nil (ggtags-oversize-p)))))
            (o ggtags-tag-overlay)
            (done-p (lambda ()
                      (and (memq o (overlays-at (car bounds)))

commit b5ad48df54975e3857b150456bb8b313be899da1
Author: Leo Liu <address@hidden>
Date:   Fri Jun 7 00:45:37 2013 +0800

    Doc fixes

diff --git a/README.rst b/README.rst
index e18db58..57ec40c 100644
--- a/README.rst
+++ b/README.rst
@@ -38,12 +38,22 @@ Screenshot
    :target: http://i.imgur.com/d430rmm.png
    :alt: ggtags.png
 
+Config
+~~~~~~
+
+Enable ``ggtags-mode`` for C/C++/Java modes::
+
+    (add-hook 'c-mode-common-hook
+              (lambda ()
+                (when (derived-mode-p 'c-mode 'c++-mode 'java-mode)
+                  (ggtags-mode 1))))
+
 Tutorial
 ~~~~~~~~
 
 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.
+point is underlined if it is a valid (definition) 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.
diff --git a/ggtags.el b/ggtags.el
index b545b8f..181f2ec 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.6.6
+;; Version: 0.6.7
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags

-----------------------------------------------------------------------

Summary of changes:
 packages/ggtags/README.rst |   12 +++++-
 packages/ggtags/ggtags.el  |  107 ++++++++++++++++++++++++++++++++++---------
 2 files changed, 95 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
ELPA



reply via email to

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