X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Ffiles.el;h=6d85246ff61eb2ebaf8c37fd7edb89456ec803b2;hb=b6949b6081dc3f85f48913def54b47fbb8cd1c3f;hp=8591d86a957343679650f0ca4d5ddf0809e48006;hpb=4328b54281c1fa5907a34519e1825ca3654734da;p=chise%2Fxemacs-chise.git- diff --git a/lisp/files.el b/lisp/files.el index 8591d86..6d85246 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2709,6 +2709,7 @@ Revert only if they differ." (funcall revert-buffer-function ignore-auto noconfirm) (let* ((opoint (point)) (newbuf nil) + (found nil) (delay-prompt nil) (auto-save-p (and (not ignore-auto) (recent-auto-save-p) @@ -2723,10 +2724,9 @@ Revert only if they differ." (error "Buffer does not seem to be associated with any file")) ((or noconfirm (and (not (buffer-modified-p)) - (let (found) - (dolist (rx revert-without-query found) - (when (string-match rx file-name) - (setq found t))))) + (dolist (rx revert-without-query found) + (when (string-match rx file-name) + (setq found t)))) ;; If we will call revert-buffer-internal, delay prompting (and (not auto-save-p) (not (buffer-modified-p)) @@ -2740,7 +2740,7 @@ Revert only if they differ." (and (setq newbuf (revert-buffer-internal file-name)) ;; ... and if different, prompt - (or noconfirm + (or noconfirm found (and delay-prompt (yes-or-no-p (format "Revert buffer from file %s? "