[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 32/38: Bind ggtags-save-to-register in ggtags-global-rerun-search
From: |
Leo Liu |
Subject: |
[elpa] 32/38: Bind ggtags-save-to-register in ggtags-global-rerun-search-map |
Date: |
Mon, 24 Mar 2014 09:31:38 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit cd56d92bf2e0d679fb3a1ab6ba0ab484a85016d9
Author: Leo Liu <address@hidden>
Date: Fri Mar 21 12:57:26 2014 +0800
Bind ggtags-save-to-register in ggtags-global-rerun-search-map
---
ggtags.el | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/ggtags.el b/ggtags.el
index 9017d4a..8732349 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -904,6 +904,7 @@ Global and Emacs."
(define-key m "\M-p" #'prev)
(define-key m "n" #'next)
(define-key m "\M-n" #'next)
+ (define-key m "r" #'ggtags-save-to-register)
(define-key m "q" #'quit)
(define-key m "\r" #'done)
m)))
@@ -931,7 +932,7 @@ Global and Emacs."
(prop "text: ") text "\n"
(propertize (make-string 32 ?-) 'face
'shadow))))))
(setq ggtags-global-search-ewoc
- (ewoc-create #'pp "Global search history keys: n:next p:prev
RET:choose\n")))
+ (ewoc-create #'pp "Global search history keys: n:next p:prev
r:register RET:choose\n")))
(dolist (data ggtags-global-search-history)
(ewoc-enter-last ggtags-global-search-ewoc data))
(and ggtags-global-rerun-search-last
@@ -944,17 +945,18 @@ Global and Emacs."
(defun ggtags-save-to-register (r)
"Save current search session to register R.
Use \\[jump-to-register] to restore the search session."
- (interactive (list (ggtags-ensure-global-buffer
- (register-read-with-preview "Save search to register:
"))))
- (ggtags-ensure-global-buffer
- (cl-labels ((prn (data)
- (pcase data
- (`(,command ,root ,_env ,line ,_)
- (princ (format "a ggtags search session `%s' in
directory `%s' at line %d."
- command root line))))))
- (set-register r (registerv-make (ggtags-global-current-search)
- :jump-func #'ggtags-global-rerun-search-1
- :print-func #'prn)))))
+ (interactive (list (register-read-with-preview "Save search to register: ")))
+ (cl-labels ((prn (data)
+ (pcase data
+ (`(,command ,root ,_env ,line ,_)
+ (princ (format "a ggtags search session `%s' in
directory `%s' at line %d."
+ command root line))))))
+ (set-register r (registerv-make
+ (if ggtags-global-search-ewoc
+ (cdr (ewoc-data (ewoc-locate
ggtags-global-search-ewoc)))
+ (ggtags-global-current-search))
+ :jump-func #'ggtags-global-rerun-search-1
+ :print-func #'prn))))
(defun ggtags-delete-tag-files ()
"Delete the tag files generated by gtags."
- [elpa] 19/38: Use read-only-mode in ggtags-toggle-project-read-only, (continued)
- [elpa] 19/38: Use read-only-mode in ggtags-toggle-project-read-only, Leo Liu, 2014/03/24
- [elpa] 18/38: Fix #36: Allow customising path to global's exectuables, Leo Liu, 2014/03/24
- [elpa] 20/38: Teach ggtags-find-tag-dwim to detect #include files, Leo Liu, 2014/03/24
- [elpa] 25/38: Fix ggtags-find-project to check on the GTAGS file, Leo Liu, 2014/03/24
- [elpa] 23/38: Simplify ggtags-save-to-register by always re-do the search, Leo Liu, 2014/03/24
- [elpa] 21/38: Add new command ggtags-save-to-register for #37, Leo Liu, 2014/03/24
- [elpa] 16/38: Fix ggtags-show-definition to run in current project, Leo Liu, 2014/03/24
- [elpa] 24/38: Fix thinko in "Don't display buffer if ggtags-navigation-mode is exited", Leo Liu, 2014/03/24
- [elpa] 26/38: New macro ignore-errors-unless-debug and use it, Leo Liu, 2014/03/24
- [elpa] 15/38: Small fixes to last change, Leo Liu, 2014/03/24
- [elpa] 32/38: Bind ggtags-save-to-register in ggtags-global-rerun-search-map,
Leo Liu <=
- [elpa] 28/38: New helper ggtags-forward-to-line and use it, Leo Liu, 2014/03/24
- [elpa] 27/38: Cosmetic change: Fix indentation, Leo Liu, 2014/03/24
- [elpa] 29/38: New feature ggtags-global-restore-search for #37, Leo Liu, 2014/03/24
- [elpa] 33/38: Disable ggtags-navigation-mode in ggtags-global-rerun-search, Leo Liu, 2014/03/24
- [elpa] 31/38: Also record ggtags-process-environment in search history, Leo Liu, 2014/03/24
- [elpa] 30/38: Polish last change, Leo Liu, 2014/03/24
- [elpa] 34/38: Support search bookmarks as requested in #39, Leo Liu, 2014/03/24
- [elpa] 38/38: Merge branch 'master' of github.com:leoliu/ggtags, Leo Liu, 2014/03/24
- [elpa] 37/38: Rename try-complete-ggtags-tag to ggtags-try-complete-tag, Leo Liu, 2014/03/24
- [elpa] 13/38: Require cl-lib and remove macro when-let, Leo Liu, 2014/03/24