summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-05-23 05:07:27 +0000
committerRichard M. Stallman <rms@gnu.org>1994-05-23 05:07:27 +0000
commitef90db45609739119fd9b13d68e9814c491648cb (patch)
treeedb646287b5f04558fc1d39e93d9a49609db8d7b /lisp
parent6b4dd332703a260f5a69d93783388e2cbd51f589 (diff)
downloademacs-ef90db45609739119fd9b13d68e9814c491648cb.tar.gz
(select-tags-table-mode): New function, a major mode.
(select-tags-table): Call that. (select-tags-table-mode-map): New variable.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/etags.el32
1 files changed, 22 insertions, 10 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index a3b51141168..0b8d7f2f045 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1421,8 +1421,6 @@ see the doc of that variable if you want to add names to the list."
(pop-to-buffer "*Tags Table List*")
(setq buffer-read-only nil)
(erase-buffer)
- (setq selective-display t
- selective-display-ellipses nil)
(let ((set-list tags-table-set-list)
(desired-point nil))
(if tags-table-list
@@ -1464,16 +1462,30 @@ see the doc of that variable if you want to add names to the list."
(goto-char desired-point))
(set-window-start (selected-window) 1 t))
(set-buffer-modified-p nil)
+ (select-tags-table-mode))
+
+(defvar select-tags-table-mode-map)
+(let ((map (make-sparse-keymap)))
+ (define-key map "t" 'select-tags-table-select)
+ (define-key map " " 'next-line)
+ (define-key map "\^?" 'previous-line)
+ (define-key map "n" 'next-line)
+ (define-key map "p" 'previous-line)
+ (define-key map "q" 'select-tags-table-quit)
+ (setq select-tags-table-mode-map map))
+
+(defun select-tags-table-mode ()
+ "Major mode for choosing a current tags table among those already loaded.
+
+\\{select-tags-table-mode-map}"
+ (interactive)
+ (kill-all-local-variables)
(setq buffer-read-only t
+ major-mode 'select-tags-table-mode
mode-name "Select Tags Table")
- (let ((map (make-sparse-keymap)))
- (define-key map "t" 'select-tags-table-select)
- (define-key map " " 'next-line)
- (define-key map "\^?" 'previous-line)
- (define-key map "n" 'next-line)
- (define-key map "p" 'previous-line)
- (define-key map "q" 'select-tags-table-quit)
- (use-local-map map)))
+ (use-local-map select-tags-table-mode-map)
+ (setq selective-display t
+ selective-display-ellipses nil))
(defun select-tags-table-select ()
"Select the tags table named on this line."