From 6bac44b29cf44457afdfa9014fea0f765906d740 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 17 Aug 1994 21:42:40 +0000 Subject: [PATCH] (after-find-file): New arg from-revert-buffer. (revert-buffer): Pass t for that. --- lisp/files.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index d227c84a2bb..9938c19b548 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -740,13 +740,14 @@ The buffer is not selected, just returned to the caller." (after-find-file error (not nowarn)))) buf))) -(defun after-find-file (&optional error warn noauto) +(defun after-find-file (&optional error warn noauto from-revert-buffer) "Called after finding a file and by the default revert function. Sets buffer mode, parses local variables. Optional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an error in reading the file. WARN non-nil means warn if there exists an auto-save file more recent than the visited file. NOAUTO means don't mess with auto-save mode. +FROM-REVERT-BUFFER means this call was from `revert-buffer'. Finishes by calling the functions in `find-file-hooks'." (setq buffer-read-only (not (file-writable-p buffer-file-name))) (if noninteractive @@ -1912,7 +1913,7 @@ beginning and `after-revert-hook' at the end." (insert-file-contents file-name (not auto-save-p) nil nil t))) (goto-char (min opoint (point-max))) - (after-find-file nil nil t) + (after-find-file nil nil t t) (run-hooks 'after-revert-hook) t))))) -- 2.39.5