summaryrefslogtreecommitdiff
path: root/lisp/fileloop.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-08-19 16:48:59 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-08-19 16:48:59 -0700
commit07fcbb558d797272b9f43547da60beda485873a3 (patch)
tree77d5da14e9f9d9d8b1d877c70c01296fd3893796 /lisp/fileloop.el
parentc9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff)
parentfb81c8c3adf8633f2f617c82f6019aef630860c7 (diff)
downloademacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz
Merge remote-tracking branch 'origin/master' into athena/unstable
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.