aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath1992-12-24 22:42:05 +0000
committerRoland McGrath1992-12-24 22:42:05 +0000
commit21ccfb5cf150f3b9bcb7a80381ecdc924b216809 (patch)
tree9e9df90e2e0275229e246196109d9aeef1ac15de
parente4fc4f587d06c57f430313f203b5fae0810ba03a (diff)
downloademacs-21ccfb5cf150f3b9bcb7a80381ecdc924b216809.tar.gz
emacs-21ccfb5cf150f3b9bcb7a80381ecdc924b216809.zip
(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 acd9c3a995a..cf21fa2e2b4 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."
369 (not (tags-table-list-member tags-file-name)) 369 (not (tags-table-list-member tags-file-name))
370 tags-file-name) 370 tags-file-name)
371 ;; Fifth, use the user variable giving the table list. 371 ;; Fifth, use the user variable giving the table list.
372 (car tags-table-list) 372 ;; Find the first element of the list that actually exists.
373 (let ((list tags-table-list)
374 file)
375 (while (and list
376 (setq file (tags-expand-table-name (car list)))
377 (not (get-file-buffer file))
378 (not (file-exists-p file)))
379 (setq list (cdr list)))
380 (car list))
373 ;; Finally, prompt the user for a file name. 381 ;; Finally, prompt the user for a file name.
374 (expand-file-name 382 (expand-file-name
375 (read-file-name "Visit tags table: (default TAGS) " 383 (read-file-name "Visit tags table: (default TAGS) "