aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath1995-08-25 16:39:34 +0000
committerRoland McGrath1995-08-25 16:39:34 +0000
commitf042d383859e631c3f81bed06b7415a49f1db164 (patch)
tree05d9d8ad0d2677eff8cf927c327414c9cdecfb08
parentad3ec2527c2bebc632742f442cf5b3a91a3eb64c (diff)
downloademacs-f042d383859e631c3f81bed06b7415a49f1db164.tar.gz
emacs-f042d383859e631c3f81bed06b7415a49f1db164.zip
(next-file): Advance next-file-list before finding the file named in its
car, in case finding signals an error.
-rw-r--r--lisp/progmodes/etags.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index fb8ab956b2f..6d4dc28c674 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1280,16 +1280,19 @@ if the file was newly read in, the value is the filename."
1280 (get-buffer " *next-file*") 1280 (get-buffer " *next-file*")
1281 (kill-buffer " *next-file*")) 1281 (kill-buffer " *next-file*"))
1282 (error "All files processed.")) 1282 (error "All files processed."))
1283 (let ((new (not (get-file-buffer (car next-file-list))))) 1283 (let* ((next (car next-file-list))
1284 (new (not (get-file-buffer next))))
1285 ;; Advance the list before trying to find the file.
1286 ;; If we get an error finding the file, don't get stuck on it.
1287 (setq next-file-list (cdr next-file-list))
1284 (if (not (and new novisit)) 1288 (if (not (and new novisit))
1285 (set-buffer (find-file-noselect (car next-file-list) novisit)) 1289 (set-buffer (find-file-noselect next novisit))
1286 ;; Like find-file, but avoids random warning messages. 1290 ;; Like find-file, but avoids random warning messages.
1287 (set-buffer (get-buffer-create " *next-file*")) 1291 (set-buffer (get-buffer-create " *next-file*"))
1288 (kill-all-local-variables) 1292 (kill-all-local-variables)
1289 (erase-buffer) 1293 (erase-buffer)
1290 (setq new (car next-file-list)) 1294 (setq new next)
1291 (insert-file-contents new nil)) 1295 (insert-file-contents new nil))
1292 (setq next-file-list (cdr next-file-list))
1293 new)) 1296 new))
1294 1297
1295(defvar tags-loop-operate nil 1298(defvar tags-loop-operate nil