Function: select-tags-table

select-tags-table is an autoloaded, interactive and byte-compiled function defined in etags.el.gz.

Signature

(select-tags-table)

Documentation

Select a tags table file from a menu of those you have already used.

The list of tags tables to select from is stored in tags-table-set-list; see the doc of that variable if you want to add names to the list.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/etags.el.gz
;; XXX If a file is in multiple tables, selection may get the wrong one.
;;;###autoload
(defun select-tags-table ()
  "Select a tags table file from a menu of those you have already used.
The list of tags tables to select from is stored in `tags-table-set-list';
see the doc of that variable if you want to add names to the list."
  (interactive)
  (pop-to-buffer "*Tags Table List*")
  (setq buffer-read-only nil
	buffer-undo-list t)
  (erase-buffer)
  (let ((set-list tags-table-set-list)
	(desired-point nil)
	b)
    (when tags-table-list
      (setq desired-point (point-marker))
      (setq b (point))
      (princ (mapcar #'abbreviate-file-name tags-table-list) (current-buffer))
      (make-text-button b (point) 'type 'tags-select-tags-table
                        'etags-table (car tags-table-list))
      (insert "\n"))
    (while set-list
      (unless (eq (car set-list) tags-table-list)
	(setq b (point))
	(princ (mapcar #'abbreviate-file-name (car set-list)) (current-buffer))
	(make-text-button b (point) 'type 'tags-select-tags-table
                          'etags-table (car (car set-list)))
	(insert "\n"))
      (setq set-list (cdr set-list)))
    (when tags-file-name
      (or desired-point
          (setq desired-point (point-marker)))
      (setq b (point))
      (insert (abbreviate-file-name tags-file-name))
      (make-text-button b (point) 'type 'tags-select-tags-table
                        'etags-table tags-file-name)
      (insert "\n"))
    (setq set-list (delete tags-file-name
			   (apply #'nconc (cons (copy-sequence tags-table-list)
                                                (mapcar #'copy-sequence
                                                        tags-table-set-list)))))
    (while set-list
      (setq b (point))
      (insert (abbreviate-file-name (car set-list)))
      (make-text-button b (point) 'type 'tags-select-tags-table
                          'etags-table (car set-list))
      (insert "\n")
      (setq set-list (delete (car set-list) set-list)))
    (goto-char (point-min))
    (insert-before-markers
     "Type `t' to select a tags table or set of tags tables:\n\n")
    (if desired-point
	(goto-char desired-point))
    (set-window-start (selected-window) 1 t))
  (set-buffer-modified-p nil)
  (select-tags-table-mode))