diff options
| author | Richard M. Stallman | 1994-08-17 21:42:40 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-08-17 21:42:40 +0000 |
| commit | 6bac44b29cf44457afdfa9014fea0f765906d740 (patch) | |
| tree | c7c98edd71dc1edb8f3fce60605cefa284dec2d0 | |
| parent | 0edb98158999f83162b07b96448fdc91c2c4ddb4 (diff) | |
| download | emacs-6bac44b29cf44457afdfa9014fea0f765906d740.tar.gz emacs-6bac44b29cf44457afdfa9014fea0f765906d740.zip | |
(after-find-file): New arg from-revert-buffer.
(revert-buffer): Pass t for that.
| -rw-r--r-- | lisp/files.el | 5 |
1 files 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." | |||
| 740 | (after-find-file error (not nowarn)))) | 740 | (after-find-file error (not nowarn)))) |
| 741 | buf))) | 741 | buf))) |
| 742 | 742 | ||
| 743 | (defun after-find-file (&optional error warn noauto) | 743 | (defun after-find-file (&optional error warn noauto from-revert-buffer) |
| 744 | "Called after finding a file and by the default revert function. | 744 | "Called after finding a file and by the default revert function. |
| 745 | Sets buffer mode, parses local variables. | 745 | Sets buffer mode, parses local variables. |
| 746 | Optional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an | 746 | Optional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an |
| 747 | error in reading the file. WARN non-nil means warn if there | 747 | error in reading the file. WARN non-nil means warn if there |
| 748 | exists an auto-save file more recent than the visited file. | 748 | exists an auto-save file more recent than the visited file. |
| 749 | NOAUTO means don't mess with auto-save mode. | 749 | NOAUTO means don't mess with auto-save mode. |
| 750 | FROM-REVERT-BUFFER means this call was from `revert-buffer'. | ||
| 750 | Finishes by calling the functions in `find-file-hooks'." | 751 | Finishes by calling the functions in `find-file-hooks'." |
| 751 | (setq buffer-read-only (not (file-writable-p buffer-file-name))) | 752 | (setq buffer-read-only (not (file-writable-p buffer-file-name))) |
| 752 | (if noninteractive | 753 | (if noninteractive |
| @@ -1912,7 +1913,7 @@ beginning and `after-revert-hook' at the end." | |||
| 1912 | (insert-file-contents file-name (not auto-save-p) | 1913 | (insert-file-contents file-name (not auto-save-p) |
| 1913 | nil nil t))) | 1914 | nil nil t))) |
| 1914 | (goto-char (min opoint (point-max))) | 1915 | (goto-char (min opoint (point-max))) |
| 1915 | (after-find-file nil nil t) | 1916 | (after-find-file nil nil t t) |
| 1916 | (run-hooks 'after-revert-hook) | 1917 | (run-hooks 'after-revert-hook) |
| 1917 | t))))) | 1918 | t))))) |
| 1918 | 1919 | ||