From: Roland McGrath Date: Sun, 9 Apr 1995 03:18:11 +0000 (+0000) Subject: (next-file): Handle empty list returned by (tags-table-files). X-Git-Url: https://git.hcoop.net/bpt/emacs.git/commitdiff_plain/2f14fde6d0fd935b267341fc2c43ed2bcc2a37f5?hp=c4f57b91f11a371b7b23ef2e7c46f6cdc515a0af (next-file): Handle empty list returned by (tags-table-files). --- diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index e572d3361f..9c76c6b28c 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1268,7 +1268,9 @@ if the file was newly read in, the value is the filename." (setq tail (cdr tail))) ;; Use a copy so the next loop iteration will not modify the ;; list later returned by (tags-table-files). - (setcdr tail (copy-sequence (tags-table-files))))))) + (if tail + (setcdr tail (copy-sequence (tags-table-files))) + (setq next-file-list (copy-sequence (tags-table-files))))))) (t ;; Initialize the list by evalling the argument. (setq next-file-list (eval initialize))))