# HG changeset patch # User Richard M. Stallman # Date 717319439 0 # Node ID de70f50101c08014ce9682dbddac733a244cf767 # Parent 9f50cccf59631ad440f4b55a27b594b2787510a5 (after-find-file): New arg NOAUTO. (revert-buffer, recover-file): Pass t for that arg. diff -r 9f50cccf5963 -r de70f50101c0 lisp/files.el --- a/lisp/files.el Thu Sep 24 01:29:22 1992 +0000 +++ b/lisp/files.el Thu Sep 24 07:23:59 1992 +0000 @@ -425,12 +425,13 @@ (after-find-file error (not nowarn)))) buf))) -(defun after-find-file (&optional error warn) +(defun after-find-file (&optional error warn noauto) "Called after finding a file and by the default revert function. Sets buffer mode, parses local variables. -Optional args ERROR and WARN: ERROR non-nil means there was an +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. Finishes by calling the functions in `find-file-hooks'." (setq buffer-read-only (not (file-writable-p buffer-file-name))) (if noninteractive @@ -470,7 +471,7 @@ (progn (message msg) (or not-serious (sit-for 1 nil t))))) - (if auto-save-default + (if (and auto-save-default (not noauto)) (auto-save-mode t))) (normal-mode t) (mapcar 'funcall find-file-hooks)) @@ -1281,7 +1282,7 @@ (erase-buffer)) (insert-file-contents file-name (not auto-save-p)))) (goto-char (min opoint (point-max))) - (after-find-file nil) + (after-find-file nil nil t) t))))) (defun recover-file (file) @@ -1313,7 +1314,7 @@ (let ((buffer-read-only nil)) (erase-buffer) (insert-file-contents file-name nil)) - (after-find-file nil)) + (after-find-file nil nil t)) (t (error "Recover-file cancelled."))))) (defun kill-some-buffers ()