X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Ffiles.el;h=05d50118fb3c8e0ae27efae62e3a997cfd8f773c;hp=4d9562d7e1eace095289eec24bcad52e7b640f92;hb=ac7d0619aad74b1d57c4748ebb3ab29d9c32e3d8;hpb=dbf2768f7b146e97e37a27316f70bb313f1acf15 diff --git a/lisp/files.el b/lisp/files.el index 4d9562d..05d5011 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2707,6 +2707,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) @@ -2721,10 +2722,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)) @@ -2738,7 +2738,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? "