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. 024388c551c43e46f9b33c0d310a5


From: Leo Liu
Subject: [ELPA-diffs] ELPA branch, master, updated. 024388c551c43e46f9b33c0d310a574f389444a4
Date: Tue, 10 Dec 2013 07:45:19 +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  024388c551c43e46f9b33c0d310a574f389444a4 (commit)
       via  856a230a2c6e576887bd7dda1761e13f7c6da54f (commit)
       via  88e58c80dea47a82ebd4364ca0882791c8bd9186 (commit)
       via  d40959587b0e0aaa727ced498683ef19f05da596 (commit)
       via  6540b7666e5c595aa6265e5a9c5aa967598c68dd (commit)
       via  4ec046d7da67f35de21308bcf77a0e7da3c26cc1 (commit)
       via  7f833f0f0068d3427a1669e0d724d3346461924b (commit)
      from  7b54229726d929707e2eb103b95473064cc73e29 (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 024388c551c43e46f9b33c0d310a574f389444a4
Merge: 7b54229 856a230
Author: Leo Liu <address@hidden>
Date:   Tue Dec 10 15:44:32 2013 +0800

    Merge branch 'master' of github.com:leoliu/ggtags


commit 856a230a2c6e576887bd7dda1761e13f7c6da54f
Author: Leo Liu <address@hidden>
Date:   Tue Dec 10 13:55:41 2013 +0800

    Ensure global buffer is shown in case of error
    
    Use relative path in ggtags-browse-file-as-hypertext.
    Doc fix.

diff --git a/README.rst b/README.rst
index 15c6dc7..2e84b95 100644
--- a/README.rst
+++ b/README.rst
@@ -2,15 +2,12 @@
  Emacs frontend to GNU Global source code tagging system
 =========================================================
  
-A package for working with `GNU Global
-<http://www.gnu.org/software/global>`_ source tagging system in Emacs.
+This package is part of `GNU ELPA <http://elpa.gnu.org>`_ (``M-x
+list-packages``) and is also available on `MELPA
+<http://melpa.milkbox.net/#/ggtags>`_.
 
-This package is part of `GNU ELPA <http://elpa.gnu.org>`_
-(``M-x list-packages``).
-
-``ggtags.el`` is tested in emacs 24.1, 24.2, 24.3 and trunk.
-
-Patches, feature requests and bug reports are welcome. Thanks.
+``ggtags.el`` is tested in emacs 24.1, 24.2, 24.3 and trunk. Patches,
+feature requests and bug reports are welcome. Thanks.
 
 Features
 ~~~~~~~~
diff --git a/ggtags.el b/ggtags.el
index 3142a4f..6e55ed6 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -705,7 +705,8 @@ Global and Emacs."
           (let ((default-directory (ggtags-current-project-root)))
             (ggtags-with-process-environment (ggtags-process-string "htags")))
         (user-error "Aborted")))
-  (let ((url (ggtags-process-string "gozilla" "-p" (format "+%d" line) file)))
+  (let ((url (ggtags-process-string "gozilla" "-p" (format "+%d" line)
+                                    (file-relative-name file))))
     (or (equal (file-name-extension
                 (url-filename (url-generic-parse-url url))) "html")
         (user-error "No hypertext form for `%s'" file))
@@ -905,6 +906,13 @@ Global and Emacs."
 
 (defvar-local ggtags-global-output-lines 0)
 
+(defun ggtags-global--display-buffer (&optional buffer)
+  (let ((buffer (or buffer (current-buffer))))
+    (unless (get-buffer-window buffer)
+      (let* ((split-window-preferred-function ggtags-split-window-function)
+             (w (display-buffer (current-buffer) '(nil (allow-no-window . 
t)))))
+        (and w (compilation-set-window-height w))))))
+
 (defun ggtags-global-filter ()
   "Called from `compilation-filter-hook' (which see)."
   ;; Get rid of line "Using config file '/PATH/TO/.globalrc'." or
@@ -916,11 +924,8 @@ Global and Emacs."
   (ansi-color-apply-on-region compilation-filter-start (point))
   (incf ggtags-global-output-lines
         (count-lines compilation-filter-start (point)))
-  (when (and (> ggtags-global-output-lines 5)
-             (not (get-buffer-window (current-buffer))))
-    (let* ((split-window-preferred-function ggtags-split-window-function)
-           (w (display-buffer (current-buffer) '(nil (allow-no-window . t)))))
-      (and w (compilation-set-window-height w))))
+  (when (> ggtags-global-output-lines 5)
+    (ggtags-global--display-buffer))
   (make-local-variable 'ggtags-global-large-output)
   (when (> ggtags-global-output-lines ggtags-global-large-output)
     (incf ggtags-global-large-output 500)
@@ -929,22 +934,23 @@ Global and Emacs."
                ggtags-global-output-lines))))
 
 (defun ggtags-handle-single-match (buf _how)
-  (when (and ggtags-auto-jump-to-first-match
-             ;; If exit abnormally keep the window for inspection.
-             (zerop ggtags-global-exit-status)
-             (save-excursion
-               (goto-char (point-min))
-               (not (ignore-errors
-                      (goto-char (compilation-next-single-property-change
-                                  (point) 'compilation-message))
-                      (end-of-line)
-                      (compilation-next-single-property-change
-                       (point) 'compilation-message)))))
-    ;; For the `compilation-auto-jump' in idle timer to run. See also:
-    ;; http://debbugs.gnu.org/13829
-    (sit-for 0)
-    (ggtags-navigation-mode -1)
-    (ggtags-navigation-mode-cleanup buf 0)))
+  (if (not (zerop ggtags-global-exit-status))
+      ;; If exit abnormally display the buffer for inspection.
+      (ggtags-global--display-buffer)
+    (when (and ggtags-auto-jump-to-first-match
+               (save-excursion
+                 (goto-char (point-min))
+                 (not (ignore-errors
+                        (goto-char (compilation-next-single-property-change
+                                    (point) 'compilation-message))
+                        (end-of-line)
+                        (compilation-next-single-property-change
+                         (point) 'compilation-message)))))
+      ;; For the `compilation-auto-jump' in idle timer to run. See also:
+      ;; http://debbugs.gnu.org/13829
+      (sit-for 0)
+      (ggtags-navigation-mode -1)
+      (ggtags-navigation-mode-cleanup buf 0))))
 
 (defvar ggtags-global-mode-font-lock-keywords
   '(("^Global \\(exited 
abnormally\\|interrupt\\|killed\\|terminated\\)\\(?:.*with code 
\\([0-9]+\\)\\)?.*"

commit 88e58c80dea47a82ebd4364ca0882791c8bd9186
Author: Leo Liu <address@hidden>
Date:   Tue Dec 10 08:59:23 2013 +0800

    Compatible with emacs 24.1 and 24.2

diff --git a/README.rst b/README.rst
index fe3f8bf..15c6dc7 100644
--- a/README.rst
+++ b/README.rst
@@ -8,6 +8,8 @@ A package for working with `GNU Global
 This package is part of `GNU ELPA <http://elpa.gnu.org>`_
 (``M-x list-packages``).
 
+``ggtags.el`` is tested in emacs 24.1, 24.2, 24.3 and trunk.
+
 Patches, feature requests and bug reports are welcome. Thanks.
 
 Features
diff --git a/ggtags.el b/ggtags.el
index 6d79c7b..3142a4f 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -391,10 +391,11 @@ properly update `ggtags-mode-map'."
         (while (pcase (read-char-choice
                        (format "Save `%s'? (y/n/=/?) " buffer-file-name)
                        '(?y ?n ?= ??))
-                 (?n (user-error "Aborted"))
-                 (?y nil)
-                 (?= (diff-buffer-with-file) 'loop)
-                 (?? (help-form-show) 'loop))))
+                 ;; ` required for 24.1 and 24.2
+                 (`?n (user-error "Aborted"))
+                 (`?y nil)
+                 (`?= (diff-buffer-with-file) 'loop)
+                 (`?? (help-form-show) 'loop))))
     (save-buffer)
     (kill-buffer)))
 
@@ -728,9 +729,10 @@ Global and Emacs."
         (i (- (ring-length find-tag-marker-ring) ggtags-tag-ring-index))
         (message-log-max nil))
     (message "%d%s marker%s" i (pcase (mod i 10)
-                                 (1 "st")
-                                 (2 "nd")
-                                 (3 "rd")
+                                 ;; ` required for 24.1 and 24.2
+                                 (`1 "st")
+                                 (`2 "nd")
+                                 (`3 "rd")
                                  (_ "th"))
              (if (marker-buffer m) "" " (dead)"))
     (if (not (marker-buffer m))
@@ -839,10 +841,11 @@ Global and Emacs."
                     count
                     (funcall (if (= count 1) #'car #'cadr)
                              (pcase db
-                               ("GTAGS"  '("definition" "definitions"))
-                               ("GSYMS"  '("symbol"     "symbols"))
-                               ("GRTAGS" '("reference"  "references"))
-                               ("ID"     '("identifier" "identifiers"))
+                               ;; ` required for 24.1 and 24.2
+                               (`"GTAGS"  '("definition" "definitions"))
+                               (`"GSYMS"  '("symbol"     "symbols"))
+                               (`"GRTAGS" '("reference"  "references"))
+                               (`"ID"     '("identifier" "identifiers"))
                                (_        '("match"      "matches"))))))
           exit-status)))
 

commit d40959587b0e0aaa727ced498683ef19f05da596
Author: Leo Liu <address@hidden>
Date:   Mon Dec 9 21:31:18 2013 +0800

    Fix #25: check display-buffer-no-window availability

diff --git a/ggtags.el b/ggtags.el
index 57324d2..6d79c7b 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -522,12 +522,14 @@ non-nil."
          (split-window-preferred-function ggtags-split-window-function)
          ;; See http://debbugs.gnu.org/13594
          (display-buffer-overriding-action
-          (if (not ggtags-auto-jump-to-first-match)
-              display-buffer-overriding-action
-            (cons (lambda (buf _action)
-                    (with-current-buffer buf
-                      (derived-mode-p 'ggtags-global-mode)))
-                  (list #'display-buffer-no-window)))))
+          (if (and ggtags-auto-jump-to-first-match
+                   ;; Appeared in emacs 24.4.
+                   (fboundp 'display-buffer-no-window))
+              (cons (lambda (buf _action)
+                      (with-current-buffer buf
+                        (derived-mode-p 'ggtags-global-mode)))
+                    (list #'display-buffer-no-window))
+            display-buffer-overriding-action)))
     (setq ggtags-global-start-marker (point-marker))
     (ggtags-navigation-mode +1)
     (setq ggtags-global-exit-status 0

commit 6540b7666e5c595aa6265e5a9c5aa967598c68dd
Author: Leo Liu <address@hidden>
Date:   Mon Dec 9 14:23:20 2013 +0800

    Remove ggtags-enable-completion-at-point

diff --git a/README.rst b/README.rst
index 21595df..fe3f8bf 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
-=========================
- Use GNU Global in Emacs
-=========================
-
+=========================================================
+ Emacs frontend to GNU Global source code tagging system
+=========================================================
+ 
 A package for working with `GNU Global
 <http://www.gnu.org/software/global>`_ source tagging system in Emacs.
 
diff --git a/ggtags.el b/ggtags.el
index 2f0a057..57324d2 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -1,4 +1,4 @@
-;;; ggtags.el --- GNU Global source code tagging system  -*- lexical-binding: 
t; -*-
+;;; ggtags.el --- emacs frontend to GNU Global source code tagging system  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2013  Free Software Foundation, Inc.
 
@@ -189,12 +189,6 @@ properly update `ggtags-mode-map'."
   :type 'key-sequence
   :group 'ggtags)
 
-(defcustom ggtags-enable-completion-at-point t
-  "Non-nil to enable completion at point using the tag table."
-  :safe 'booleanp
-  :type 'boolean
-  :group 'ggtags)
-
 (defcustom ggtags-completing-read-function completing-read-function
   "Ggtags specific `completing-read-function' (which see)."
   :type 'function
@@ -1278,11 +1272,9 @@ Global and Emacs."
   (if ggtags-mode
       (progn
         (add-hook 'after-save-hook 'ggtags-after-save-function nil t)
-        (when ggtags-enable-completion-at-point
-          (add-hook 'completion-at-point-functions
-                    #'ggtags-completion-at-point nil t))
-        (or (executable-find "global")
-            (message "Failed to find GNU Global")))
+        ;; Append to serve as a fallback method.
+        (add-hook 'completion-at-point-functions
+                  #'ggtags-completion-at-point t t))
     (remove-hook 'after-save-hook 'ggtags-after-save-function t)
     (remove-hook 'completion-at-point-functions #'ggtags-completion-at-point t)
     (and (overlayp ggtags-highlight-tag-overlay)

commit 4ec046d7da67f35de21308bcf77a0e7da3c26cc1
Author: Leo Liu <address@hidden>
Date:   Mon Dec 9 09:42:49 2013 +0800

    Fix #26: suppress same file warnings

diff --git a/ggtags.el b/ggtags.el
index d00c117..2f0a057 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -967,6 +967,8 @@ Global and Emacs."
   (setq-local compilation-error-face 'compilation-info)
   (setq-local compilation-exit-message-function
               'ggtags-global-exit-message-function)
+  ;; See: https://github.com/leoliu/ggtags/issues/26
+  (setq-local find-file-suppress-same-file-warnings t)
   (setq-local truncate-lines t)
   (jit-lock-register #'ggtags-abbreviate-files)
   (add-hook 'compilation-filter-hook 'ggtags-global-filter nil 'local)

commit 7f833f0f0068d3427a1669e0d724d3346461924b
Author: Leo Liu <address@hidden>
Date:   Mon Dec 9 08:57:12 2013 +0800

    Fix #25: be more defensive

diff --git a/ggtags.el b/ggtags.el
index f01400c..d00c117 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.7.7
+;; Version: 0.7.8
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -688,7 +688,8 @@ Global and Emacs."
               (when (yes-or-no-p "Remove GNU Global tag files? ")
                 (mapc #'delete-file files)
                 (remhash (ggtags-current-project-root) ggtags-projects)
-                (delete-overlay ggtags-highlight-tag-overlay)
+                (and (overlayp ggtags-highlight-tag-overlay)
+                     (delete-overlay ggtags-highlight-tag-overlay))
                 (kill-local-variable 'ggtags-project)))
           (when (window-live-p win)
             (quit-window t win)))))))
@@ -970,6 +971,7 @@ Global and Emacs."
   (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)
+  (add-hook 'kill-buffer-hook (lambda () (ggtags-navigation-mode -1)) nil t)
   (define-key ggtags-global-mode-map "\M-o" 'visible-mode))
 
 ;; NOTE: Need this to avoid putting menu items in
@@ -1114,14 +1116,16 @@ Global and Emacs."
 
 (define-minor-mode ggtags-navigation-mode nil
   :lighter
-  (" GG[" (:eval (ggtags-ensure-global-buffer
-                   (let ((index (when (get-text-property 
(line-beginning-position)
-                                                         'compilation-message)
-                                  ;; Assume the first match appears at line 5
-                                  (- (line-number-at-pos) 4))))
-                     `((:propertize ,(if index
-                                         (number-to-string (max index 0))
-                                       "?") face success) "/"))))
+  (" GG[" (:eval
+           (ignore-errors
+             (ggtags-ensure-global-buffer
+              (let ((index (when (get-text-property (line-beginning-position)
+                                                    'compilation-message)
+                             ;; Assume the first match appears at line 5
+                             (- (line-number-at-pos) 4))))
+                `((:propertize ,(if index
+                                    (number-to-string (max index 0))
+                                  "?") face success) "/")))))
    (:propertize (:eval (number-to-string ggtags-global-match-count))
                 face success)
    (:eval

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

Summary of changes:
 packages/ggtags/README.rst |   19 +++---
 packages/ggtags/ggtags.el  |  131 +++++++++++++++++++++++--------------------
 2 files changed, 79 insertions(+), 71 deletions(-)


hooks/post-receive
-- 
ELPA



reply via email to

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