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

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

[elpa] 01/05: Fix warning "making variable buffer local while let-bound!


From: Leo Liu
Subject: [elpa] 01/05: Fix warning "making variable buffer local while let-bound!"
Date: Sat, 12 Apr 2014 08:15:44 +0000

leoliu pushed a commit to branch master
in repository elpa.

commit de91c35966ab5e93093f970e26ef2d1b88a86239
Author: Leo Liu <address@hidden>
Date:   Sun Apr 6 09:47:36 2014 +0800

    Fix warning "making variable buffer local while let-bound!"
    
    for ggtags-global-output-format.
---
 ggtags.el |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/ggtags.el b/ggtags.el
index 2e986e8..e992acb 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2013-2014  Free Software Foundation, Inc.
 
 ;; Author: Leo Liu <address@hidden>
-;; Version: 0.8.2
+;; Version: 0.8.3
 ;; Keywords: tools, convenience
 ;; Created: 2013-01-29
 ;; URL: https://github.com/leoliu/ggtags
@@ -792,7 +792,7 @@ Do nothing if GTAGS exceeds the oversize limit unless 
FORCE."
      (save-excursion
        (beginning-of-line)
        (and (looking-at re) (match-string sub))))
-    (_ (warn "Invalid value for `ggtags-include-pattern':%s"
+    (_ (warn "Invalid value for `ggtags-include-pattern': %s"
              ggtags-include-pattern)
        nil)))
 
@@ -811,7 +811,7 @@ definition tags."
      (if include (list include 'include)
        (list (ggtags-read-tag 'definition current-prefix-arg)
              (and current-prefix-arg 'definition)))))
-  (ggtags-check-project)     ; for `ggtags-current-project-root' below
+  (ggtags-check-project)     ; For `ggtags-current-project-root' below.
   (cond
    ((eq what 'include)
     (ggtags-find-file name))
@@ -1306,7 +1306,7 @@ commands `next-error' and `previous-error'.
 
 (defun ggtags-abbreviate-files (start end)
   (goto-char start)
-  (let* ((error-re (cdr (assq ggtags-global-output-format
+  (let* ((error-re (cdr (assq (car compilation-error-regexp-alist)
                               ggtags-global-error-regexp-alist-alist)))
          (sub (cadr error-re)))
     (when (and ggtags-global-abbreviate-filename error-re)
@@ -1411,10 +1411,9 @@ commands `next-error' and `previous-error'.
 
 (define-compilation-mode ggtags-global-mode "Global"
   "A mode for showing outputs from gnu global."
-  ;; Make it buffer local for `ggtags-abbreviate-files'.
-  (make-local-variable 'ggtags-global-output-format)
-  (setq-local compilation-error-regexp-alist
-              (list ggtags-global-output-format))
+  ;; Note: Place `ggtags-global-output-format' as first element for
+  ;; `ggtags-abbreviate-files'.
+  (setq-local compilation-error-regexp-alist (list 
ggtags-global-output-format))
   (pcase ggtags-auto-jump-to-match
     (`history (make-local-variable 'ggtags-auto-jump-to-match-target)
               (setq-local compilation-auto-jump-to-first-error



reply via email to

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