Created
March 12, 2014 14:58
-
-
Save leoliu/9508659 to your computer and use it in GitHub Desktop.
ggtags.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ggtags.el b/ggtags.el | |
index fa007a9f..1584f8b3 100644 | |
--- a/ggtags.el | |
+++ b/ggtags.el | |
@@ -1128,6 +1128,7 @@ (defvar ggtags-navigation-map | |
(define-key map "\M-{" 'ggtags-navigation-previous-file) | |
(define-key map "\M->" 'ggtags-navigation-last-error) | |
(define-key map "\M-<" 'ggtags-navigation-first-error) | |
+ (define-key map "\C-hr" 'ggtags-navigation-rename-buffer) | |
(define-key map "\C-c\C-k" | |
(lambda () (interactive) | |
(ggtags-ensure-global-buffer (kill-compilation)))) | |
@@ -1245,6 +1246,14 @@ (defun ggtags-navigation-last-error () | |
(compilation-previous-error 1) | |
(compile-goto-error))) | |
+(defun ggtags-navigation-rename-buffer (name) | |
+ (interactive | |
+ (list (if current-prefix-arg | |
+ (read-string "New buffer name: ") | |
+ (format "*ggtags-%s*" (or ggtags-current-tag-name "save"))))) | |
+ (cl-check-type name string) | |
+ (ggtags-ensure-global-buffer (rename-buffer name t))) | |
+ | |
(defun ggtags-navigation-visible-mode (&optional arg) | |
(interactive (list (or current-prefix-arg 'toggle))) | |
(ggtags-ensure-global-buffer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment