# HG changeset patch # User Richard M. Stallman # Date 859931237 0 # Node ID c8228f461dda35a503e9b3531ff1a1d8f7c00cb5 # Parent 214a5cc55c56788e5d8b0940d6e3ba5aa0894580 (vc-checkin-hook): Doc fix. (vc-before-checkin-hook): New hook. (vc-start-entry): Use it. diff -r 214a5cc55c56 -r c8228f461dda lisp/vc.el --- a/lisp/vc.el Tue Apr 01 07:17:40 1997 +0000 +++ b/lisp/vc.el Tue Apr 01 21:47:17 1997 +0000 @@ -123,8 +123,14 @@ "*A string or list of strings specifying switches to be be passed to diff.") ;;;###autoload +(defvar vc-before-checkin-hook nil + "*Normal hook (list of functions) run before a file gets checked in. +See `run-hooks'.") + +;;;###autoload (defvar vc-checkin-hook nil - "*List of functions called after a checkin is done. See `run-hooks'.") + "*Normal hook (List of functions) run after a checkin is done. +See `run-hooks'.") ;; Header-insertion hair @@ -861,6 +867,12 @@ ;; Remember the file's buffer in vc-parent-buffer (current one if no file). ;; AFTER-HOOK specifies the local value for vc-log-operation-hook. (let ((parent (if file (find-file-noselect file) (current-buffer)))) + (if vc-before-checkin-hook + (if file + (save-excursion + (set-buffer parent) + (run-hooks 'vc-before-checkin-hook)) + (run-hooks 'vc-before-checkin-hook))) (if comment (set-buffer (get-buffer-create "*VC-log*")) (pop-to-buffer (get-buffer-create "*VC-log*")))