[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 13/14: Fix #44: New variable ggtags-enable-navigation-keys
From: |
Leo Liu |
Subject: |
[elpa] 13/14: Fix #44: New variable ggtags-enable-navigation-keys |
Date: |
Sun, 30 Mar 2014 07:02:41 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 6b7bb1ac734e9cc45fa301e4a9419c4c1fd95427
Author: Leo Liu <address@hidden>
Date: Sun Mar 30 11:46:34 2014 +0800
Fix #44: New variable ggtags-enable-navigation-keys
to control ggtags-navigation-map. Using ggtags-navigation-mode is
unsafe because it is used more than controlling ggtags-navigation-map.
Affect #40: ggtags-suppress-navigation-keys is removed; use
ggtags-enable-navigation-keys instead.
---
ggtags.el | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index 98c1212..faf4d06 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -213,8 +213,9 @@ This affects `ggtags-find-file' and `ggtags-grep'."
:type 'integer
:group 'ggtags)
-(defcustom ggtags-suppress-navigation-keys nil
- "If non-nil key bindings in `ggtags-navigation-map' are suppressed."
+(defcustom ggtags-enable-navigation-keys t
+ "If non-nil key bindings in `ggtags-navigation-map' are enabled."
+ :safe 'booleanp
:type 'boolean
:group 'ggtags)
@@ -942,7 +943,7 @@ Global and Emacs."
(erase-buffer)
(special-mode)
(use-local-map ggtags-global-rerun-search-map)
- (setq-local ggtags-navigation-mode nil)
+ (setq-local ggtags-enable-navigation-keys nil)
(setq-local bookmark-make-record-function #'ggtags-make-bookmark-record)
(setq truncate-lines t)
(cl-labels ((prop (s) (propertize s 'face 'minibuffer-prompt))
@@ -1290,8 +1291,7 @@ commands `next-error' and `previous-error'.
(cl-incf ggtags-global-output-lines
(count-lines compilation-filter-start (point)))
(when (and (> ggtags-global-output-lines 5) ggtags-navigation-mode)
- (ggtags-global--display-buffer)
- (setq-local ggtags-navigation-mode nil))
+ (ggtags-global--display-buffer))
(when (and (eq ggtags-auto-jump-to-match 'history)
(numberp ggtags-auto-jump-to-match-target)
;; `ggtags-global-output-lines' is imprecise.
@@ -1368,6 +1368,7 @@ commands `next-error' and `previous-error'.
(add-hook 'compilation-filter-hook 'ggtags-global-filter nil 'local)
(add-hook 'compilation-finish-functions 'ggtags-global-handle-exit nil t)
(setq-local bookmark-make-record-function #'ggtags-make-bookmark-record)
+ (setq-local ggtags-enable-navigation-keys nil)
(add-hook 'kill-buffer-hook (lambda () (ggtags-navigation-mode -1)) nil t))
;; NOTE: Need this to avoid putting menu items in
@@ -1394,7 +1395,7 @@ commands `next-error' and `previous-error'.
map))
(defvar ggtags-mode-map-alist
- `((ggtags-navigation-mode . ,ggtags-navigation-map)))
+ `((ggtags-enable-navigation-keys . ,ggtags-navigation-map)))
(defvar ggtags-navigation-mode-map
(let ((map (make-sparse-keymap))
@@ -1567,8 +1568,7 @@ commands `next-error' and `previous-error'.
(progn
;; Higher priority for `ggtags-navigation-mode' to avoid being
;; hijacked by modes such as `view-mode'.
- (unless ggtags-suppress-navigation-keys
- (add-to-list 'emulation-mode-map-alists 'ggtags-mode-map-alist))
+ (add-to-list 'emulation-mode-map-alists 'ggtags-mode-map-alist)
(add-hook 'next-error-hook 'ggtags-global-next-error-function)
(add-hook 'minibuffer-setup-hook 'ggtags-minibuffer-setup-function))
(setq emulation-mode-map-alists
@@ -1578,7 +1578,7 @@ commands `next-error' and `previous-error'.
(defun ggtags-minibuffer-setup-function ()
;; Disable ggtags-navigation-mode in minibuffer.
- (setq-local ggtags-navigation-mode nil))
+ (setq-local ggtags-enable-navigation-keys nil))
(defun ggtags-kill-file-buffers (&optional interactive)
"Kill all buffers visiting files in current project."
- [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, 2014/03/30
- [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 <=
- [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