Mercurial > emacs
changeset 12942:3685b0e52d2a
(next-file): Advance next-file-list before finding the file named in its
car, in case finding signals an error.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Fri, 25 Aug 1995 16:39:34 +0000 |
parents | 0c332255735f |
children | 10d0f42db2da |
files | lisp/progmodes/etags.el |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/etags.el Fri Aug 25 15:35:37 1995 +0000 +++ b/lisp/progmodes/etags.el Fri Aug 25 16:39:34 1995 +0000 @@ -1280,16 +1280,19 @@ (get-buffer " *next-file*") (kill-buffer " *next-file*")) (error "All files processed.")) - (let ((new (not (get-file-buffer (car next-file-list))))) + (let* ((next (car next-file-list)) + (new (not (get-file-buffer next)))) + ;; Advance the list before trying to find the file. + ;; If we get an error finding the file, don't get stuck on it. + (setq next-file-list (cdr next-file-list)) (if (not (and new novisit)) - (set-buffer (find-file-noselect (car next-file-list) novisit)) + (set-buffer (find-file-noselect next novisit)) ;; Like find-file, but avoids random warning messages. (set-buffer (get-buffer-create " *next-file*")) (kill-all-local-variables) (erase-buffer) - (setq new (car next-file-list)) + (setq new next) (insert-file-contents new nil)) - (setq next-file-list (cdr next-file-list)) new)) (defvar tags-loop-operate nil