diff options
| author | Karl Heuer | 1995-05-29 19:42:42 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-05-29 19:42:42 +0000 |
| commit | 5f76e7d492047bd9a96c374bbf61979f990f75cf (patch) | |
| tree | c5b4e81bd92f55ccc356b43f8dfcbb5987dad40f | |
| parent | eee20f6aa9b29c200667ad6174c2ba983c26aa9f (diff) | |
| download | emacs-5f76e7d492047bd9a96c374bbf61979f990f75cf.tar.gz emacs-5f76e7d492047bd9a96c374bbf61979f990f75cf.zip | |
(after-revert-hook, before-revert-hook): Add defvars.
| -rw-r--r-- | lisp/files.el | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el index 4b68d391ff5..28e9485b6e6 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1952,6 +1952,20 @@ which are the arguments that `revert-buffer' received.") | |||
| 1952 | Gets two args, first the nominal file name to use, | 1952 | Gets two args, first the nominal file name to use, |
| 1953 | and second, t if reading the auto-save file.") | 1953 | and second, t if reading the auto-save file.") |
| 1954 | 1954 | ||
| 1955 | (defvar before-revert-hook nil | ||
| 1956 | "Normal hook for `revert-buffer' to run before reverting. | ||
| 1957 | If `revert-buffer-function' is used to override the normal revert | ||
| 1958 | mechanism, this hook is not used.") | ||
| 1959 | |||
| 1960 | (defvar after-revert-hook nil | ||
| 1961 | "Normal hook for `revert-buffer' to run after reverting. | ||
| 1962 | Note that the hook value that it runs is the value that was in effect | ||
| 1963 | before reverting; that makes a difference if you have buffer-local | ||
| 1964 | hook functions. | ||
| 1965 | |||
| 1966 | If `revert-buffer-function' is used to override the normal revert | ||
| 1967 | mechanism, this hook is not used.") | ||
| 1968 | |||
| 1955 | (defun revert-buffer (&optional ignore-auto noconfirm) | 1969 | (defun revert-buffer (&optional ignore-auto noconfirm) |
| 1956 | "Replace the buffer text with the text of the visited file on disk. | 1970 | "Replace the buffer text with the text of the visited file on disk. |
| 1957 | This undoes all changes since the file was visited or saved. | 1971 | This undoes all changes since the file was visited or saved. |