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. 28af4b01108a9d572e680087488cf


From: Leo Liu
Subject: [ELPA-diffs] ELPA branch, master, updated. 28af4b01108a9d572e680087488cf1b543e078df
Date: Wed, 06 Nov 2013 08:30:34 +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  28af4b01108a9d572e680087488cf1b543e078df (commit)
       via  80d3d4d58d75c94197d5812eb32f306a00f96f66 (commit)
       via  6a960f2b60ce6386b2d06eb661292d03bd856e57 (commit)
       via  a85d13d6093adc8964aa51b74e5587faca82fa33 (commit)
       via  c05feea059470f764c0bc81f28b376eac2faec93 (commit)
      from  dcf0481c7b91816815e6aa95c24915289d286bbd (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 28af4b01108a9d572e680087488cf1b543e078df
Merge: dcf0481 80d3d4d
Author: Leo Liu <address@hidden>
Date:   Wed Nov 6 16:06:49 2013 +0800

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


commit 80d3d4d58d75c94197d5812eb32f306a00f96f66
Author: Leo Liu <address@hidden>
Date:   Wed Nov 6 16:04:15 2013 +0800

    Some small fixes

diff --git a/README.rst b/README.rst
index 9318945..4b0f84b 100644
--- a/README.rst
+++ b/README.rst
@@ -22,7 +22,7 @@ Features
 #. Manage Global's environment variables on a per-project basis.
 #. Support all Global search backends: ``grep``, ``idutils`` etc.
 #. Query replace.
-#. Highlight tag at point.
+#. Highlight (definition) tag at point.
 #. Abbreviated display of file names.
 #. Support `exuberant ctags <http://ctags.sourceforge.net/>`_ backend.
 #. Support all Global's output formats: ``grep``, ``ctags-x``,
@@ -64,6 +64,8 @@ More languages/modes are supported if `GNU Global
 See ``plugin-factory/README`` in GNU Global source for further
 information.
 
+Also see https://github.com/leoliu/ggtags/wiki for more examples.
+
 Tutorial
 ~~~~~~~~
 
diff --git a/ggtags.el b/ggtags.el
index c9fac6e..f189165 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.1
+;; Version: 0.7.2
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -379,6 +379,7 @@ properly update `ggtags-mode-map'."
                       (split-string
                        (apply #'ggtags-process-string
                               "global"
+                              ;; Note -c alone returns only definitions
                               (if completion-ignore-case
                                   (list "--ignore-case" "-Tc" prefix)
                                 (list "-Tc" prefix)))
@@ -1050,7 +1051,7 @@ Global and Emacs."
      "S-down-mouse-1 for defintions\nS-down-mouse-3 for references")
 
 (defun ggtags-highlight-tag-at-point ()
-  (when (eq ggtags-project 'unset)
+  (when (and ggtags-mode (eq ggtags-project 'unset))
     (ggtags-find-project))
   (when (and ggtags-mode ggtags-project)
     (unless (overlayp ggtags-highlight-tag-overlay)

commit 6a960f2b60ce6386b2d06eb661292d03bd856e57
Author: Leo Liu <address@hidden>
Date:   Wed Nov 6 11:47:51 2013 +0800

    Fix ggtags-highlight-tag-at-point to set ggtags-project
    
    Fix ggtags-unload-function return value meet unload-feature
    requirement.

diff --git a/ggtags.el b/ggtags.el
index 114c6b5..c9fac6e 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -290,16 +290,17 @@ properly update `ggtags-mode-map'."
                                 :oversize-p oversize-p)
              ggtags-projects)))
 
-(defvar-local ggtags-project nil)
+(defvar-local ggtags-project 'unset)
 
 ;;;###autoload
 (defun ggtags-find-project ()
-  (or ggtags-project
-      (let ((root (ignore-errors (file-name-as-directory
-                                  (ggtags-process-string "global" "-pr")))))
-        (and root (setq ggtags-project
-                        (or (gethash (file-truename root) ggtags-projects)
-                            (ggtags-make-project root)))))))
+  (if (ggtags-project-p ggtags-project)
+      ggtags-project
+    (let ((root (ignore-errors (file-name-as-directory
+                                (ggtags-process-string "global" "-pr")))))
+      (setq ggtags-project
+            (and root (or (gethash (file-truename root) ggtags-projects)
+                          (ggtags-make-project root)))))))
 
 (defun ggtags-current-project-root ()
   (and (ggtags-find-project)
@@ -1049,6 +1050,8 @@ Global and Emacs."
      "S-down-mouse-1 for defintions\nS-down-mouse-3 for references")
 
 (defun ggtags-highlight-tag-at-point ()
+  (when (eq ggtags-project 'unset)
+    (ggtags-find-project))
   (when (and ggtags-mode ggtags-project)
     (unless (overlayp ggtags-highlight-tag-overlay)
       (let ((o (make-overlay (point) (point) nil t)))
@@ -1131,7 +1134,8 @@ Global and Emacs."
 
 (defun ggtags-unload-function ()
   (setq emulation-mode-map-alists
-        (delq 'ggtags-mode-map-alist emulation-mode-map-alists)))
+        (delq 'ggtags-mode-map-alist emulation-mode-map-alists))
+  nil)
 
 (provide 'ggtags)
 ;;; ggtags.el ends here

commit a85d13d6093adc8964aa51b74e5587faca82fa33
Author: Leo Liu <address@hidden>
Date:   Wed Nov 6 09:40:09 2013 +0800

    Stop timer from erring when GTAGS not found
    
    Fix ggtags-get-libpath to support ggtags-process-environment.

diff --git a/README.rst b/README.rst
index e148361..9318945 100644
--- a/README.rst
+++ b/README.rst
@@ -15,7 +15,8 @@ Features
 
 #. Automatically update Global's tag files when needed with tuning for
    large source trees.
-#. Build on ``compile.el`` for asynchrony and its large feature-set.
+#. Build on ``compile.el`` for asynchronicity and its large
+   feature-set.
 #. Intuitive navigation among multiple matches with mode-line display
    of current match, total matches and exit status.
 #. Manage Global's environment variables on a per-project basis.
diff --git a/ggtags.el b/ggtags.el
index 34f7975..114c6b5 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -240,8 +240,8 @@ properly update `ggtags-mode-map'."
          (ggtags-list-of-string-p (cdr xs)))))
 
 (defun ggtags-get-libpath ()
-  (split-string (or (getenv "GTAGSLIBPATH") "")
-                (regexp-quote path-separator) t))
+  (let ((path (ggtags-with-process-environment (getenv "GTAGSLIBPATH"))))
+    (and path (split-string path (regexp-quote path-separator) t))))
 
 (defun ggtags-process-string (program &rest args)
   (with-temp-buffer
@@ -1049,7 +1049,7 @@ Global and Emacs."
      "S-down-mouse-1 for defintions\nS-down-mouse-3 for references")
 
 (defun ggtags-highlight-tag-at-point ()
-  (when ggtags-mode
+  (when (and ggtags-mode ggtags-project)
     (unless (overlayp ggtags-highlight-tag-overlay)
       (let ((o (make-overlay (point) (point) nil t)))
         (setq ggtags-highlight-tag-overlay o)))

commit c05feea059470f764c0bc81f28b376eac2faec93
Author: Leo Liu <address@hidden>
Date:   Tue Nov 5 22:32:24 2013 +0800

    Code cleanup

diff --git a/ggtags.el b/ggtags.el
index fb6906e..34f7975 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -354,36 +354,34 @@ properly update `ggtags-mode-map'."
                         t)))
             (message "GTAGS generated in `%s'" root))))))
 
-(defun ggtags-update-tags (&optional single-update)
+(defun ggtags-update-tags (&optional force)
   "Update GNU Global tag database."
-  (interactive)
-  (ggtags-with-process-environment
-   (if single-update
-       (when buffer-file-name
-         (process-file "global" nil 0 nil "--single-update"
-                       (file-truename buffer-file-name)))
-     (ggtags-process-string "global" "-u"))))
+  (interactive "P")
+  (when (or force (and (ggtags-find-project)
+                       (ggtags-project-dirty-p (ggtags-find-project))))
+    (ggtags-with-process-environment
+     (with-temp-message "Running `global -u'"
+       (ggtags-process-string "global" "-u")
+       (setf (ggtags-project-dirty-p (ggtags-find-project)) nil)))))
 
 (defvar ggtags-completion-table
   (let (cache)
     (completion-table-dynamic
      (lambda (prefix)
-       (when (ggtags-find-project)
-         (when (and (ggtags-project-dirty-p (ggtags-find-project))
-                    (not (ggtags-project-oversize-p (ggtags-find-project))))
-           (ggtags-update-tags)
-           (setf (ggtags-project-dirty-p (ggtags-find-project)) nil))
-         (unless (equal prefix (car cache))
-           (setq cache
-                 (cons prefix
-                       (ggtags-with-process-environment
-                        (split-string
-                         (apply #'ggtags-process-string
-                                "global"
-                                (if completion-ignore-case
-                                    (list "--ignore-case" "-Tc" prefix)
-                                  (list "-Tc" prefix)))
-                         "\n" t))))))
+       (when (and (ggtags-find-project)
+                  (not (ggtags-project-oversize-p (ggtags-find-project))))
+         (ggtags-update-tags))
+       (unless (equal prefix (car cache))
+         (setq cache
+               (cons prefix
+                     (ggtags-with-process-environment
+                      (split-string
+                       (apply #'ggtags-process-string
+                              "global"
+                              (if completion-ignore-case
+                                  (list "--ignore-case" "-Tc" prefix)
+                                (list "-Tc" prefix)))
+                       "\n" t)))))
        (cdr cache)))))
 
 (defun ggtags-read-tag ()
@@ -755,6 +753,13 @@ Global and Emacs."
     (define-key map [remap ggtags-find-tag-dwim] 'undefined)
     map))
 
+(defvar ggtags-mode-map-alist
+  `((ggtags-navigation-mode . ,ggtags-navigation-map)))
+
+;; Higher priority for `ggtags-navigation-mode' to avoid being
+;; hijacked by modes such as `view-mode'.
+(add-to-list 'emulation-mode-map-alists 'ggtags-mode-map-alist)
+
 (defvar ggtags-navigation-mode-map
   (let ((map (make-sparse-keymap))
         (menu (make-sparse-keymap "GG-Navigation")))
@@ -926,7 +931,9 @@ Global and Emacs."
     ;; When oversize update on a per-save basis.
     (when (and buffer-file-name
                (ggtags-project-oversize-p (ggtags-find-project)))
-      (ggtags-update-tags 'single-update))))
+      (ggtags-with-process-environment
+       (process-file "global" nil 0 nil "--single-update"
+                     (file-truename buffer-file-name))))))
 
 (defvar ggtags-mode-prefix-map
   (let ((m (make-sparse-keymap)))
@@ -1005,11 +1012,16 @@ Global and Emacs."
     map))
 
 (defvar ggtags-highlight-tag-overlay nil)
+
 (defvar ggtags-highlight-tag-timer nil)
 
 ;;;###autoload
 (define-minor-mode ggtags-mode nil
   :lighter (:eval (if ggtags-navigation-mode "" " GG"))
+  (unless (timerp ggtags-highlight-tag-timer)
+    (setq ggtags-highlight-tag-timer
+          (run-with-idle-timer
+           ggtags-highlight-tag-delay t 'ggtags-highlight-tag-at-point)))
   (if ggtags-mode
       (progn
         (add-hook 'after-save-hook 'ggtags-after-save-function nil t)
@@ -1112,22 +1124,6 @@ Global and Emacs."
       (setq he-expand-list (cdr he-expand-list))
       t)))
 
-;;; Finish up
-
-(when ggtags-highlight-tag-timer
-  (cancel-timer ggtags-highlight-tag-timer))
-
-(setq ggtags-highlight-tag-timer
-      (run-with-idle-timer
-       ggtags-highlight-tag-delay t 'ggtags-highlight-tag-at-point))
-
-;; 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-map)))
-
-(add-to-list 'emulation-mode-map-alists 'ggtags-mode-map-alist)
-
 (defun ggtags-reload (&optional force)
   (interactive "P")
   (unload-feature 'ggtags force)

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

Summary of changes:
 packages/ggtags/README.rst |    7 ++-
 packages/ggtags/ggtags.el  |  107 ++++++++++++++++++++++----------------------
 2 files changed, 59 insertions(+), 55 deletions(-)


hooks/post-receive
-- 
ELPA



reply via email to

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