aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) "