diff options
| author | Richard M. Stallman | 1997-04-01 21:47:17 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-04-01 21:47:17 +0000 |
| commit | f0b188ed3d5e64498f3cc78cf928a88fc7a5a1e4 (patch) | |
| tree | 6d50214e518bbcee08e3de569cc37c3aef0dc79f | |
| parent | 3dbcf3f67b2180d4c8aec76ad0298aaacad9dab0 (diff) | |
| download | emacs-f0b188ed3d5e64498f3cc78cf928a88fc7a5a1e4.tar.gz emacs-f0b188ed3d5e64498f3cc78cf928a88fc7a5a1e4.zip | |
(vc-checkin-hook): Doc fix.
(vc-before-checkin-hook): New hook.
(vc-start-entry): Use it.
| -rw-r--r-- | lisp/vc.el | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index e4ffc8dcf9f..37694325cda 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -123,8 +123,14 @@ walk file trees.") | |||
| 123 | "*A string or list of strings specifying switches to be be passed to diff.") | 123 | "*A string or list of strings specifying switches to be be passed to diff.") |
| 124 | 124 | ||
| 125 | ;;;###autoload | 125 | ;;;###autoload |
| 126 | (defvar vc-before-checkin-hook nil | ||
| 127 | "*Normal hook (list of functions) run before a file gets checked in. | ||
| 128 | See `run-hooks'.") | ||
| 129 | |||
| 130 | ;;;###autoload | ||
| 126 | (defvar vc-checkin-hook nil | 131 | (defvar vc-checkin-hook nil |
| 127 | "*List of functions called after a checkin is done. See `run-hooks'.") | 132 | "*Normal hook (List of functions) run after a checkin is done. |
| 133 | See `run-hooks'.") | ||
| 128 | 134 | ||
| 129 | ;; Header-insertion hair | 135 | ;; Header-insertion hair |
| 130 | 136 | ||
| @@ -861,6 +867,12 @@ merge in the changes into your working copy." | |||
| 861 | ;; Remember the file's buffer in vc-parent-buffer (current one if no file). | 867 | ;; Remember the file's buffer in vc-parent-buffer (current one if no file). |
| 862 | ;; AFTER-HOOK specifies the local value for vc-log-operation-hook. | 868 | ;; AFTER-HOOK specifies the local value for vc-log-operation-hook. |
| 863 | (let ((parent (if file (find-file-noselect file) (current-buffer)))) | 869 | (let ((parent (if file (find-file-noselect file) (current-buffer)))) |
| 870 | (if vc-before-checkin-hook | ||
| 871 | (if file | ||
| 872 | (save-excursion | ||
| 873 | (set-buffer parent) | ||
| 874 | (run-hooks 'vc-before-checkin-hook)) | ||
| 875 | (run-hooks 'vc-before-checkin-hook))) | ||
| 864 | (if comment | 876 | (if comment |
| 865 | (set-buffer (get-buffer-create "*VC-log*")) | 877 | (set-buffer (get-buffer-create "*VC-log*")) |
| 866 | (pop-to-buffer (get-buffer-create "*VC-log*"))) | 878 | (pop-to-buffer (get-buffer-create "*VC-log*"))) |