changeset 7645:202339c81fa4

(select-tags-table-mode): New function, a major mode. (select-tags-table): Call that. (select-tags-table-mode-map): New variable.
author Richard M. Stallman <rms@gnu.org>
date Mon, 23 May 1994 05:07:27 +0000
parents d50f6828a89d
children de2c4334fad4
files lisp/progmodes/etags.el
diffstat 1 files changed, 22 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/etags.el	Mon May 23 04:59:35 1994 +0000
+++ b/lisp/progmodes/etags.el	Mon May 23 05:07:27 1994 +0000
@@ -1421,8 +1421,6 @@
   (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 @@
 	(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."