aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>1992-12-24 22:42:05 +0000
committerRoland McGrath <[email protected]>1992-12-24 22:42:05 +0000
commit21ccfb5cf150f3b9bcb7a80381ecdc924b216809 (patch)
tree9e9df90e2e0275229e246196109d9aeef1ac15de
parente4fc4f587d06c57f430313f203b5fae0810ba03a (diff)
(visit-tags-table-buffer): When picking a table and using tags-table-list,
skip over nonexistent files in the list.
-rw-r--r--lisp/progmodes/etags.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index acd9c3a995..cf21fa2e2b 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -369,7 +369,15 @@ Returns t if it visits a tags table, or nil if there are no more in the list."
(not (tags-table-list-member tags-file-name))
tags-file-name)
;; Fifth, use the user variable giving the table list.
- (car tags-table-list)
+ ;; Find the first element of the list that actually exists.
+ (let ((list tags-table-list)
+ file)
+ (while (and list
+ (setq file (tags-expand-table-name (car list)))
+ (not (get-file-buffer file))
+ (not (file-exists-p file)))
+ (setq list (cdr list)))
+ (car list))
;; Finally, prompt the user for a file name.
(expand-file-name
(read-file-name "Visit tags table: (default TAGS) "