[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 06/14: New user variable ggtags-global-use-color
From: |
Leo Liu |
Subject: |
[elpa] 06/14: New user variable ggtags-global-use-color |
Date: |
Sun, 30 Mar 2014 07:02:39 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit aed41594a91342d104c82b924aa52eff9b24ff83
Author: Leo Liu <address@hidden>
Date: Fri Mar 28 09:52:53 2014 +0800
New user variable ggtags-global-use-color
---
ggtags.el | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index aeac34a..6b373e9 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -179,6 +179,12 @@ If an integer abbreviate only names longer than that
number."
(const cscope))
:group 'ggtags)
+(defcustom ggtags-global-use-color t
+ "Non-nil to use color in output if supported by Global."
+ :type 'boolean
+ :safe 'booleanp
+ :group 'ggtags)
+
(defcustom ggtags-global-ignore-case nil
"Non-nil if Global should ignore case in the search pattern."
:safe 'booleanp
@@ -259,6 +265,10 @@ properly update `ggtags-mode-map'."
:type 'function
:group 'ggtags)
+;; Used by ggtags-global-mode
+(defvar ggtags-global-error "match"
+ "Stem of message to print when no matches are found.")
+
(defconst ggtags-bug-url "https://github.com/leoliu/ggtags/issues")
(defvar ggtags-global-last-buffer nil)
@@ -269,10 +279,6 @@ properly update `ggtags-mode-map'."
(defvar ggtags-highlight-tag-timer nil)
-;; Used by ggtags-global-mode
-(defvar ggtags-global-error "match"
- "Stem of message to print when no matches are found.")
-
(defmacro ggtags-ensure-global-buffer (&rest body)
(declare (indent 0))
`(progn
@@ -400,9 +406,8 @@ Value is new modtime if updated."
;; See https://github.com/leoliu/ggtags/issues/42
;;
;; It is unsafe to cache `ggtags-project-root' in non-file buffers.
- ;; But we keep the cache for at this a command's duration so that
- ;; multiple calls of `ggtags-find-project' has no performance
- ;; impact.
+ ;; But we keep the cache for a command's duration so that multiple
+ ;; calls of `ggtags-find-project' has no performance impact.
(unless buffer-file-name
(add-hook 'pre-command-hook #'ggtags-clear-project-root nil t))
(let ((project (gethash ggtags-project-root ggtags-projects)))
@@ -654,7 +659,8 @@ Do nothing if GTAGS exceeds the oversize limit unless
FORCE."
"-v"
(format "--result=%s" ggtags-global-output-format)
(and ggtags-global-ignore-case "--ignore-case")
- (and (ggtags-find-project)
+ (and ggtags-global-use-color
+ (ggtags-find-project)
(ggtags-project-has-color (ggtags-find-project))
"--color=always")
(and (ggtags-find-project)
@@ -1013,7 +1019,7 @@ Use \\[jump-to-register] to restore the search session."
(list (read-file-name "Browse file: " nil nil t)
(read-number "Line: " 1))
(list buffer-file-name (line-number-at-pos))))
- (cl-check-type line integer)
+ (cl-check-type line (integer 1))
(or (and file (file-exists-p file)) (error "File `%s' doesn't exist" file))
(ggtags-check-project)
(or (file-exists-p (expand-file-name "HTML" (ggtags-current-project-root)))
- [elpa] branch master updated (b8924f8 -> 3dc7169), Leo Liu, 2014/03/30
- [elpa] 03/14: Change ggtags-read-tag to completing-read when no default, Leo Liu, 2014/03/30
- [elpa] 02/14: Fix #12: Remove ggtags-completing-read-function, Leo Liu, 2014/03/30
- [elpa] 04/14: Fix ggtags-try-complete-tag to use ggtags-bounds-of-tag-function, Leo Liu, 2014/03/30
- [elpa] 05/14: Fix #42: Clear ggtags-project-root in non-file buffers, Leo Liu, 2014/03/30
- [elpa] 01/14: Enhance ggtags-view-tag-history to use next-/previous-error, Leo Liu, 2014/03/30
- [elpa] 06/14: New user variable ggtags-global-use-color,
Leo Liu <=
- [elpa] 08/14: Fix warning: Making variable buffer-local while let-bound!, Leo Liu, 2014/03/30
- [elpa] 10/14: Disable ggtags-navigation-mode at the right time, Leo Liu, 2014/03/30
- [elpa] 13/14: Fix #44: New variable ggtags-enable-navigation-keys, Leo Liu, 2014/03/30
- [elpa] 09/14: Use compilation-auto-jump in ggtags-global-filter, Leo Liu, 2014/03/30
- [elpa] 11/14: Rename ggtags-handle-single-match to ggtags-global-handle-exit, Leo Liu, 2014/03/30
- [elpa] 12/14: Fix ggtags-navigation-mode-abort when pop-tag-mark errs, Leo Liu, 2014/03/30
- [elpa] 14/14: Merge branch 'master' of github.com:leoliu/ggtags, Leo Liu, 2014/03/30
- [elpa] 07/14: Implement feature #43: Jump to match from search history, Leo Liu, 2014/03/30