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. 30809c7e797f57c50a63f64ac19eb


From: Leo Liu
Subject: [ELPA-diffs] ELPA branch, master, updated. 30809c7e797f57c50a63f64ac19eb8b78bc21939
Date: Mon, 18 Nov 2013 09:32:50 +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  30809c7e797f57c50a63f64ac19eb8b78bc21939 (commit)
       via  42adcf9e3df6b88b2351035571f1bcb288079f31 (commit)
       via  a4b22bf434b898c41e0ec5d6239ffbe799418a0a (commit)
       via  00c47764c6088ca6d895a229f61386fbf23e82a1 (commit)
       via  5d34f8baf63e762b21aa7393c711ad2c0ce59088 (commit)
       via  ae44d102f8885be7722d5d0928e47ae89bf25923 (commit)
       via  3bb62bde8bb3307aa08069d282d68e2fad3d8ae7 (commit)
       via  01db641475a3fa0b8417c87d0d30775d59800669 (commit)
       via  1cea1fc28f3f43ce2be0adf9fe21ce7655472ddb (commit)
       via  014fe54f479f1d60480541d5daa75e61ce2ee105 (commit)
       via  59295305ff9d0cb18de92c09dc6c177c6c7ba0a4 (commit)
       via  298c2af00b67bf2161de03f58b42442f0c58cf60 (commit)
       via  c8122fbca542d1661e48da964ee0ff0617186bf2 (commit)
       via  59833d392ef0d5820860a8ce19e0ceb4b1758b5c (commit)
      from  21f48e0df307a9e66c480f5be891609161cab4c3 (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 30809c7e797f57c50a63f64ac19eb8b78bc21939
Merge: 21f48e0 42adcf9
Author: Leo Liu <address@hidden>
Date:   Mon Nov 18 17:31:49 2013 +0800

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


commit 42adcf9e3df6b88b2351035571f1bcb288079f31
Author: Leo Liu <address@hidden>
Date:   Mon Nov 18 13:21:52 2013 +0800

    Add bindings for next-error and previous-error

diff --git a/ggtags.el b/ggtags.el
index 9dc58be..0f822a3 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -1139,6 +1139,7 @@ Global and Emacs."
 
 (defvar ggtags-mode-prefix-map
   (let ((m (make-sparse-keymap)))
+    (define-key m "\M-'" 'previous-error)
     (define-key m (kbd "M-DEL") 'ggtags-delete-tag-files)
     (define-key m "\M-p" 'ggtags-prev-mark)
     (define-key m "\M-n" 'ggtags-next-mark)
@@ -1196,6 +1197,10 @@ Global and Emacs."
     (define-key menu [prev-mark]
       '(menu-item "Previous mark" ggtags-prev-mark))
     (define-key menu [sep1] menu-bar-separator)
+    (define-key menu [previous-error]
+      '(menu-item "Previous match" previous-error))
+    (define-key menu [next-error]
+      '(menu-item "Next match" next-error))
     (define-key menu [find-file]
       '(menu-item "Find files" ggtags-find-file))
     (define-key menu [query-replace]

commit a4b22bf434b898c41e0ec5d6239ffbe799418a0a
Author: Leo Liu <address@hidden>
Date:   Mon Nov 18 11:50:27 2013 +0800

    Fix #22: try harder to compute relative names
    
    Ensure GTAGSROOT ends without '/'. Other small fixes.

diff --git a/ggtags.el b/ggtags.el
index cef5ebc..9dc58be 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -246,20 +246,19 @@ properly update `ggtags-mode-map'."
 
 (defmacro ggtags-with-process-environment (&rest body)
   (declare (debug t))
-  `(let ((process-environment
-          (append (let ((process-environment process-environment))
-                    (when (ggtags-find-project)
-                      (setenv "GTAGSROOT" (directory-file-name
-                                           (ggtags-current-project-root))))
-                    (mapcar #'substitute-env-vars ggtags-process-environment))
-                  process-environment
-                  (and (ggtags-current-project-root)
-                       (list (concat "GTAGSROOT="
-                                     (ggtags-current-project-root))))
-                  (and (ggtags-find-project)
-                       (not (ggtags-project-has-rtags (ggtags-find-project)))
-                       (list "GTAGSLABEL=ctags")))))
-     ,@body))
+  (let ((gtagsroot (make-symbol "-gtagsroot-")))
+    `(let* ((,gtagsroot (when (ggtags-find-project)
+                          (directory-file-name (ggtags-current-project-root))))
+            (process-environment
+             (append (let ((process-environment process-environment))
+                       (and ,gtagsroot (setenv "GTAGSROOT" ,gtagsroot))
+                       (mapcar #'substitute-env-vars 
ggtags-process-environment))
+                     process-environment
+                     (and ,gtagsroot (list (concat "GTAGSROOT=" ,gtagsroot)))
+                     (and (ggtags-find-project)
+                          (not (ggtags-project-has-rtags 
(ggtags-find-project)))
+                          (list "GTAGSLABEL=ctags")))))
+       ,@body)))
 
 (defun ggtags-list-of-string-p (xs)
   "Return non-nil if XS is a list of strings."
@@ -492,7 +491,7 @@ non-nil."
                             (`grep "--grep")
                             (`idutils "--idutils")))
                     args)))
-    (mapconcat 'identity (delq nil xs) " ")))
+    (mapconcat #'identity (delq nil xs) " ")))
 
 ;; takes three values: nil, t and a marker
 (defvar ggtags-global-start-marker nil)
@@ -549,8 +548,12 @@ With a prefix arg (non-nil DEFINITION) always find 
definitions."
              (shell-quote-argument
               ;; Note `ggtags-global-start' binds default-directory to
               ;; project root.
-              (file-relative-name buffer-file-name
-                                  (ggtags-current-project-root))))
+              (file-relative-name
+               buffer-file-name
+               (if (string-prefix-p (ggtags-current-project-root)
+                                    buffer-file-name)
+                   (ggtags-current-project-root)
+                 (locate-dominating-file buffer-file-name "GTAGS")))))
      name)))
 
 (defun ggtags-find-reference (name)
@@ -657,7 +660,7 @@ Global and Emacs."
             (progn
               (fit-window-to-buffer win)
               (when (yes-or-no-p "Remove GNU Global tag files? ")
-                (mapc 'delete-file files)
+                (mapc #'delete-file files)
                 (remhash (ggtags-current-project-root) ggtags-projects)
                 (delete-overlay ggtags-highlight-tag-overlay)
                 (kill-local-variable 'ggtags-project)))
@@ -748,7 +751,7 @@ Global and Emacs."
                          (buffer-substring (line-beginning-position)
                                            (line-end-position)))))))
               (setq tabulated-list-format
-                    `[("ID" ,(max (1+ (floor (log10 counter))) 2)
+                    `[("ID" ,(max (1+ (floor (log counter 10))) 2)
                        (lambda (x y) (< (car x) (car y))))
                       ("Buffer" ,(max (loop for m in elements
                                             for b = (marker-buffer m)
@@ -758,7 +761,7 @@ Global and Emacs."
                        t :right-align t)
                       ("Position" ,(max (loop for m in elements
                                               for p = (or (marker-position m) 
1)
-                                              maximize (1+ (floor (log10 p))))
+                                              maximize (1+ (floor (log p 10))))
                                         8)
                        (lambda (x y)
                          (< (string-to-number (aref (cadr x) 2))
@@ -811,7 +814,7 @@ Global and Emacs."
               msg
             (format "found %d %s"
                     count
-                    (funcall (if (= count 1) 'first 'second)
+                    (funcall (if (= count 1) #'car #'cadr)
                              (pcase db
                                ("GTAGS"  '("definition" "definitions"))
                                ("GSYMS"  '("symbol"     "symbols"))
@@ -1011,7 +1014,7 @@ Global and Emacs."
            (when (and (derived-mode-p 'ggtags-global-mode)
                       (get-buffer-window))
              (quit-window nil (get-buffer-window)))
-           (and time (run-with-idle-timer time nil 'kill-buffer buf))))))
+           (and time (run-with-idle-timer time nil #'kill-buffer buf))))))
 
 (defun ggtags-navigation-mode-done ()
   (interactive)
@@ -1225,7 +1228,7 @@ Global and Emacs."
   (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)))
+           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)
@@ -1322,7 +1325,7 @@ Global and Emacs."
                  (ggtags-find-project)
                  (sort (all-completions he-search-string
                                         ggtags-completion-table)
-                       'string-lessp))))
+                       #'string-lessp))))
     (if (null he-expand-list)
         (progn
           (if old (he-reset-string))

commit 00c47764c6088ca6d895a229f61386fbf23e82a1
Author: Leo Liu <address@hidden>
Date:   Mon Nov 18 02:40:48 2013 +0800

    Handle `global -c' error: only name char is allowed
    
    in ggtags-highlight-tag-at-point.

diff --git a/ggtags.el b/ggtags.el
index 18fec27..cef5ebc 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -1246,9 +1246,6 @@ Global and Emacs."
 (put 'ggtags-active-tag 'face 'ggtags-highlight)
 (put 'ggtags-active-tag 'keymap ggtags-highlight-tag-map)
 ;; (put 'ggtags-active-tag 'mouse-face 'match)
-(put 'ggtags-active-tag 'modification-hooks
-     (list (lambda (o after &rest _args)
-             (and (not after) (delete-overlay o)))))
 (put 'ggtags-active-tag 'help-echo
      "S-down-mouse-1 for definitions\nS-down-mouse-3 for references")
 
@@ -1257,21 +1254,26 @@ Global and Emacs."
     (ggtags-find-project))
   (when (and ggtags-mode ggtags-project)
     (unless (overlayp ggtags-highlight-tag-overlay)
-      (setq ggtags-highlight-tag-overlay (make-overlay (point) (point) nil t)))
+      (setq ggtags-highlight-tag-overlay (make-overlay (point) (point) nil t))
+      (overlay-put ggtags-highlight-tag-overlay 'modification-hooks
+                   (list (lambda (o after &rest _args)
+                           (and (not after) (delete-overlay o))))))
     (let ((bounds (funcall ggtags-bounds-of-tag-function))
           (o ggtags-highlight-tag-overlay))
       (cond
        ((and bounds
-             (overlay-get o 'category)
              (eq (overlay-buffer o) (current-buffer))
              (= (overlay-start o) (car bounds))
              (= (overlay-end o) (cdr bounds)))
-        ;; Tag is already highlighted so do nothing.
+        ;; Overlay matches current tag so do nothing.
         nil)
        ((and bounds (let ((completion-ignore-case nil))
-                      (test-completion
-                       (buffer-substring (car bounds) (cdr bounds))
-                       ggtags-completion-table)))
+                      (ignore-errors
+                        ;; May throw: global: only name char is
+                        ;; allowed with -c option
+                        (test-completion
+                         (buffer-substring (car bounds) (cdr bounds))
+                         ggtags-completion-table))))
         (move-overlay o (car bounds) (cdr bounds) (current-buffer))
         (overlay-put o 'category 'ggtags-active-tag))
        (t (move-overlay o

commit 5d34f8baf63e762b21aa7393c711ad2c0ce59088
Author: Leo Liu <address@hidden>
Date:   Sun Nov 17 20:34:54 2013 +0800

    New helper macro when-let and use it

diff --git a/ggtags.el b/ggtags.el
index f775e6d..18fec27 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -70,7 +70,12 @@
     (defmacro defvar-local (var val &optional docstring)
       (declare (debug defvar) (doc-string 3))
       (list 'progn (list 'defvar var val docstring)
-            (list 'make-variable-buffer-local (list 'quote var))))))
+            (list 'make-variable-buffer-local (list 'quote var)))))
+
+  (defmacro* when-let ((var exp) &rest body)
+    "A macro that combines `let' and `when'."
+    (declare (indent 1) (debug ((sexp form) body)))
+    `(let ((,var ,exp)) (when ,var ,@body))))
 
 (eval-and-compile
   (or (fboundp 'user-error)
@@ -175,8 +180,8 @@ Users should change the value using `customize-variable' to
 properly update `ggtags-mode-map'."
   :set (lambda (sym value)
          (when (bound-and-true-p ggtags-mode-map)
-           (let ((old (and (boundp sym) (symbol-value sym))))
-             (and old (define-key ggtags-mode-map old nil)))
+           (when-let (old (and (boundp sym) (symbol-value sym)))
+             (define-key ggtags-mode-map old nil))
            (and value
                 (bound-and-true-p ggtags-mode-prefix-map)
                 (define-key ggtags-mode-map value ggtags-mode-prefix-map)))
@@ -264,8 +269,8 @@ properly update `ggtags-mode-map'."
          (ggtags-list-of-string-p (cdr xs)))))
 
 (defun ggtags-get-libpath ()
-  (let ((path (ggtags-with-process-environment (getenv "GTAGSLIBPATH"))))
-    (and path (split-string path (regexp-quote path-separator) t))))
+  (when-let (path (ggtags-with-process-environment (getenv "GTAGSLIBPATH")))
+    (split-string path (regexp-quote path-separator) t)))
 
 (defun ggtags-process-string (program &rest args)
   (with-temp-buffer
@@ -279,8 +284,8 @@ properly update `ggtags-mode-map'."
       output)))
 
 (defun ggtags-tag-at-point ()
-  (let ((bounds (funcall ggtags-bounds-of-tag-function)))
-    (and bounds (buffer-substring (car bounds) (cdr bounds)))))
+  (when-let (bounds (funcall ggtags-bounds-of-tag-function))
+    (buffer-substring (car bounds) (cdr bounds))))
 
 ;;; Store for project settings
 
@@ -318,8 +323,8 @@ properly update `ggtags-mode-map'."
   (pcase ggtags-oversize-limit
     (`nil nil)
     (`t t)
-    (size (let ((project (or project (ggtags-find-project))))
-            (and project (> (ggtags-project-tag-size project) size))))))
+    (size (when-let (project (or project (ggtags-find-project)))
+            (> (ggtags-project-tag-size project) size)))))
 
 ;;;###autoload
 (defun ggtags-find-project ()
@@ -336,9 +341,9 @@ properly update `ggtags-mode-map'."
                     ;; the GTAGS file which could cause issues such as
                     ;; https://github.com/leoliu/ggtags/issues/22, so
                     ;; let's help it out.
-                    (let ((gtags (locate-dominating-file
-                                  default-directory "GTAGS")))
-                      (and gtags (file-truename gtags))))))
+                    (when-let (gtags (locate-dominating-file
+                                      default-directory "GTAGS"))
+                      (file-truename gtags)))))
       (setq ggtags-project
             (and root (or (gethash root ggtags-projects)
                           (ggtags-make-project root)))))))
@@ -1287,18 +1292,17 @@ Global and Emacs."
 ;;;###autoload
 (defun ggtags-build-imenu-index ()
   "A function suitable for `imenu-create-index-function'."
-  (when buffer-file-name
-    (let ((file (file-relative-name buffer-file-name)))
-      (with-temp-buffer
-        (when (with-demoted-errors
-                (zerop (ggtags-with-process-environment
-                        (process-file "global" nil t nil "-x" "-f" file))))
-          (goto-char (point-min))
-          (loop while (re-search-forward
-                       "^\\([^ \t]+\\)[ \t]+\\([0-9]+\\)" nil t)
-                collect (list (match-string 1)
-                              (string-to-number (match-string 2))
-                              'ggtags-goto-imenu-index)))))))
+  (when-let (file (and buffer-file-name (file-relative-name buffer-file-name)))
+    (with-temp-buffer
+      (when (with-demoted-errors
+              (zerop (ggtags-with-process-environment
+                      (process-file "global" nil t nil "-x" "-f" file))))
+        (goto-char (point-min))
+        (loop while (re-search-forward
+                     "^\\([^ \t]+\\)[ \t]+\\([0-9]+\\)" nil t)
+              collect (list (match-string 1)
+                            (string-to-number (match-string 2))
+                            'ggtags-goto-imenu-index))))))
 
 ;;; hippie-expand
 

commit ae44d102f8885be7722d5d0928e47ae89bf25923
Author: Leo Liu <address@hidden>
Date:   Sun Nov 17 19:18:45 2013 +0800

    Fix #23: don't disable M-. in ggtags-navigation-mode

diff --git a/ggtags.el b/ggtags.el
index 8fc5912..f775e6d 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -946,9 +946,7 @@ Global and Emacs."
     (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)
-    (define-key map [remap ggtags-find-tag-dwim] 'undefined)
     map))
 
 (defvar ggtags-mode-map-alist

commit 3bb62bde8bb3307aa08069d282d68e2fad3d8ae7
Author: Leo Liu <address@hidden>
Date:   Sun Nov 17 17:32:47 2013 +0800

    Fix #22: teach ggtags-find-project to handle symbolic links

diff --git a/ggtags.el b/ggtags.el
index 2a5e99c..8fc5912 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -248,6 +248,9 @@ properly update `ggtags-mode-map'."
                                            (ggtags-current-project-root))))
                     (mapcar #'substitute-env-vars ggtags-process-environment))
                   process-environment
+                  (and (ggtags-current-project-root)
+                       (list (concat "GTAGSROOT="
+                                     (ggtags-current-project-root))))
                   (and (ggtags-find-project)
                        (not (ggtags-project-has-rtags (ggtags-find-project)))
                        (list "GTAGSLABEL=ctags")))))
@@ -326,9 +329,16 @@ properly update `ggtags-mode-map'."
         (remhash (ggtags-project-root ggtags-project) ggtags-projects)
         (kill-local-variable 'ggtags-project)
         (ggtags-find-project))
-    (let ((root (ignore-errors (file-name-as-directory
-                                ;; Resolves symbolic links
-                                (ggtags-process-string "global" "-pr")))))
+    (let ((root (or (ignore-errors (file-name-as-directory
+                                    ;; Resolves symbolic links
+                                    (ggtags-process-string "global" "-pr")))
+                    ;; 'global -pr' resolves symlinks before checking
+                    ;; the GTAGS file which could cause issues such as
+                    ;; https://github.com/leoliu/ggtags/issues/22, so
+                    ;; let's help it out.
+                    (let ((gtags (locate-dominating-file
+                                  default-directory "GTAGS")))
+                      (and gtags (file-truename gtags))))))
       (setq ggtags-project
             (and root (or (gethash root ggtags-projects)
                           (ggtags-make-project root)))))))

commit 01db641475a3fa0b8417c87d0d30775d59800669
Author: Leo Liu <address@hidden>
Date:   Sat Nov 16 17:50:21 2013 +0800

    Turn off ggtags-navigation-mode after compilation-auto-jump
    
    so that ggtags-global-next-error-hook has a chance to run.

diff --git a/ggtags.el b/ggtags.el
index bf38ef6..2a5e99c 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -887,10 +887,11 @@ Global and Emacs."
                       (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)
-    ;; 0.5s delay for `ggtags-auto-jump-to-first-match'
-    (sit-for 0)                    ; See: http://debbugs.gnu.org/13829
-    (ggtags-navigation-mode-cleanup buf 0.5)))
+    (ggtags-navigation-mode-cleanup buf 0)))
 
 (defvar ggtags-global-mode-font-lock-keywords
   '(("^Global \\(exited 
abnormally\\|interrupt\\|killed\\|terminated\\)\\(?:.*with code 
\\([0-9]+\\)\\)?.*"
@@ -1082,9 +1083,6 @@ Global and Emacs."
       (progn
         (add-hook 'next-error-hook 'ggtags-global-next-error-hook)
         (add-hook 'minibuffer-setup-hook 'ggtags-minibuffer-setup-function))
-    ;; Call `ggtags-global-save-start-marker' in case of exiting from
-    ;; `ggtags-handle-single-match' for single match.
-    (ggtags-global-save-start-marker)
     (remove-hook 'next-error-hook 'ggtags-global-next-error-hook)
     (remove-hook 'minibuffer-setup-hook 'ggtags-minibuffer-setup-function)))
 

commit 1cea1fc28f3f43ce2be0adf9fe21ce7655472ddb
Author: Leo Liu <address@hidden>
Date:   Sat Nov 16 16:41:49 2013 +0800

    Small improvement to ggtags-global-exit-message-function
    
    to handle 'object not found ...' message from global.

diff --git a/ggtags.el b/ggtags.el
index f7409cb..bf38ef6 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -776,8 +776,10 @@ Global and Emacs."
   (pcase-let ((`(,count . ,db)
                (save-excursion
                  (goto-char (point-max))
-                 (if (re-search-backward "^\\([0-9]+\\) \\w+ located" nil t)
-                     (cons (string-to-number (match-string 1))
+                 (if (re-search-backward
+                      "^\\w+ \\(not found\\)\\|^\\([0-9]+\\) \\w+ located" nil 
t)
+                     (cons (or (and (match-string 1) 0)
+                               (string-to-number (match-string 2)))
                            (when (re-search-forward
                                   "using 
\\(?:\\(idutils\\)\\|'[^']*/\\(\\w+\\)'\\)"
                                   (line-end-position)

commit 014fe54f479f1d60480541d5daa75e61ce2ee105
Author: Leo Liu <address@hidden>
Date:   Sat Nov 16 12:46:01 2013 +0800

    Give better description to the type of tags found

diff --git a/ggtags.el b/ggtags.el
index a80816c..f7409cb 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -773,11 +773,18 @@ Global and Emacs."
 
 (defun ggtags-global-exit-message-function (_process-status exit-status msg)
   (setq ggtags-global-exit-status exit-status)
-  (let ((count (save-excursion
+  (pcase-let ((`(,count . ,db)
+               (save-excursion
                  (goto-char (point-max))
                  (if (re-search-backward "^\\([0-9]+\\) \\w+ located" nil t)
-                     (string-to-number (match-string 1))
-                   0))))
+                     (cons (string-to-number (match-string 1))
+                           (when (re-search-forward
+                                  "using 
\\(?:\\(idutils\\)\\|'[^']*/\\(\\w+\\)'\\)"
+                                  (line-end-position)
+                                  t)
+                             (or (and (match-string 1) "ID")
+                                 (match-string 2))))
+                   (cons 0 nil)))))
     (setq ggtags-global-match-count count)
     ;; Clear the start marker in case of zero matches.
     (and (zerop count)
@@ -785,7 +792,15 @@ Global and Emacs."
          (setq ggtags-global-start-marker nil))
     (cons (if (> exit-status 0)
               msg
-            (format "found %d %s" count (if (= count 1) "match" "matches")))
+            (format "found %d %s"
+                    count
+                    (funcall (if (= count 1) 'first 'second)
+                             (pcase db
+                               ("GTAGS"  '("definition" "definitions"))
+                               ("GSYMS"  '("symbol"     "symbols"))
+                               ("GRTAGS" '("reference"  "references"))
+                               ("ID"     '("identifier" "identifiers"))
+                               (_        '("match"      "matches"))))))
           exit-status)))
 
 ;;; NOTE: Must not match the 'Global started at Mon Jun 3 10:24:13'

commit 59295305ff9d0cb18de92c09dc6c177c6c7ba0a4
Author: Leo Liu <address@hidden>
Date:   Fri Nov 15 16:08:08 2013 +0800

    Don't run ggtags-update-tags in ggtags-completion-table
    
    for efficiency because the latter is used by
    ggtags-highlight-tag-at-point. Lower ggtags-oversize-limit.

diff --git a/ggtags.el b/ggtags.el
index 4a89926..a80816c 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -88,7 +88,7 @@
   "Face used to highlight matched line in Global buffer."
   :group 'ggtags)
 
-(defcustom ggtags-oversize-limit (* 50 1024 1024)
+(defcustom ggtags-oversize-limit (* 10 1024 1024)
   "The over size limit for the  GTAGS file.
 For large source trees, running 'global -u' can be expensive.
 Thus when GTAGS file is larger than this limit, ggtags
@@ -431,7 +431,6 @@ non-nil."
 (defvar ggtags-completion-table
   (completion-table-dynamic
    (lambda (prefix)
-     (ggtags-update-tags)
      (unless (equal prefix (car ggtags-completion-cache))
        (setq ggtags-completion-cache
              (cons prefix
@@ -452,6 +451,7 @@ non-nil."
         (completing-read-function ggtags-completing-read-function))
     (setq ggtags-current-tag-name
           (cond (current-prefix-arg
+                 (ggtags-update-tags)
                  (completing-read
                   (format (if default "Tag (default %s): " "Tag: ") default)
                   ggtags-completion-table nil t nil nil default))

commit 298c2af00b67bf2161de03f58b42442f0c58cf60
Merge: 59833d3 c8122fb
Author: Leo Liu <address@hidden>
Date:   Thu Nov 14 00:30:49 2013 -0800

    Merge pull request #21 from purcell/patch-1
    
    Require Emacs 24


commit c8122fbca542d1661e48da964ee0ff0617186bf2
Author: Steve Purcell <address@hidden>
Date:   Thu Nov 14 08:24:47 2013 +0000

    Require Emacs 24
    
    Declaring lexical-binding:t implies that the code requires Emacs 24 or 
higher.

diff --git a/ggtags.el b/ggtags.el
index 4d50366..4a89926 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -7,6 +7,7 @@
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
+;; Package-Requires: ((emacs "24"))
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by

commit 59833d392ef0d5820860a8ce19e0ceb4b1758b5c
Author: Leo Liu <address@hidden>
Date:   Thu Nov 14 12:25:22 2013 +0800

    Don't hard-code envvars in ggtags-save-project-settings

diff --git a/ggtags.el b/ggtags.el
index 7122376..4d50366 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.5
+;; Version: 0.7.6
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -339,7 +339,7 @@ properly update `ggtags-mode-map'."
 (defun ggtags-check-project ()
   (or (ggtags-find-project) (error "File GTAGS not found")))
 
-(defun ggtags-save-project-settings (&optional confirm)
+(defun ggtags-save-project-settings (&optional noconfirm)
   "Save Gnu Global's specific environment variables."
   (interactive "P")
   (ggtags-check-project)
@@ -353,18 +353,28 @@ properly update `ggtags-mode-map'."
                   process-environment
                   (and (not (ggtags-project-has-rtags (ggtags-find-project)))
                        (list "GTAGSLABEL=ctags"))))
-         (envlist (loop for x in '("GTAGSROOT"
-                                   "GTAGSDBPATH"
-                                   "GTAGSLIBPATH"
-                                   "GTAGSCONF"
-                                   "GTAGSLABEL"
-                                   "MAKEOBJDIRPREFIX"
-                                   "GTAGSTHROUGH"
-                                   "GTAGSBLANKENCODE")
-                        when (getenv x)
-                        collect (concat x "=" (getenv x)))))
+         (envlist (delete-dups
+                   (loop for x in process-environment
+                         when (string-match
+                               "^\\(GTAGS[^=\n]*\\|MAKEOBJDIRPREFIX\\)=" x)
+                         ;; May have duplicates thus `delete-dups'.
+                         collect (concat (match-string 1 x)
+                                         "="
+                                         (getenv (match-string 1 x))))))
+         (help-form (format "y: save\nn: don't save\n=: diff\n?: help\n")))
     (add-dir-local-variable nil 'ggtags-process-environment envlist)
-    (unless confirm (save-buffer) (kill-buffer))))
+    ;; Remove trailing newlines by `add-dir-local-variable'.
+    (let ((delete-trailing-lines t)) (delete-trailing-whitespace))
+    (or noconfirm
+        (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))))
+    (save-buffer)
+    (kill-buffer)))
 
 (defun ggtags-toggle-project-read-only ()
   (interactive)

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

Summary of changes:
 packages/ggtags/ggtags.el |  210 +++++++++++++++++++++++++++-----------------
 1 files changed, 129 insertions(+), 81 deletions(-)


hooks/post-receive
-- 
ELPA



reply via email to

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