mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
fileloop-next-file: Convert file-error to warnings
* lisp/fileloop.el (fileloop-next-file): Catch file-error and convert to a delayed warning (bug#79356).
This commit is contained in:
parent
a6dd36e9b1
commit
077a2e8f3b
1 changed files with 8 additions and 2 deletions
|
|
@ -121,10 +121,16 @@ operating on the next file and nil otherwise."
|
|||
(kill-all-local-variables)
|
||||
(erase-buffer)
|
||||
(setq new next)
|
||||
(condition-case nil
|
||||
(condition-case err
|
||||
(insert-file-contents new nil)
|
||||
(file-missing
|
||||
(fileloop-next-file novisit))))
|
||||
(fileloop-next-file novisit))
|
||||
(file-error
|
||||
;; See bug#79356 for discussion.
|
||||
(let ((msg (error-message-string err)))
|
||||
(unless (string-search new msg)
|
||||
(setq msg (format "%s: %s" new msg)))
|
||||
(delay-warning 'file-error msg :error)))))
|
||||
new)))
|
||||
|
||||
(defun fileloop-continue ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue