summaryrefslogtreecommitdiff
path: root/lisp/fileloop.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/fileloop.el')
-rw-r--r--lisp/fileloop.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/fileloop.el b/lisp/fileloop.el
index cb9fe8f7769..45b9cea9397 100644
--- a/lisp/fileloop.el
+++ b/lisp/fileloop.el
@@ -120,7 +120,10 @@ operating on the next file and nil otherwise."
(kill-all-local-variables)
(erase-buffer)
(setq new next)
- (insert-file-contents new nil))
+ (condition-case nil
+ (insert-file-contents new nil)
+ (file-missing
+ (fileloop-next-file novisit))))
new)))
(defun fileloop-continue ()
@@ -171,7 +174,8 @@ operating on the next file and nil otherwise."
(goto-char pos))
(push-mark original-point t))
- (switch-to-buffer (current-buffer))
+ (let (switch-to-buffer-preserve-window-point)
+ (switch-to-buffer (current-buffer)))
;; Now operate on the file.
;; If value is non-nil, continue to scan the next file.