# HG changeset patch # User Dave Love # Date 888324845 0 # Node ID e574548385826fcf71ed76bce9ce582a2406af17 # Parent 1abf4d6ec4884cb88af6f3bc877cb7fab4a1d64f (vc-checkin-hook): Add :options. (vc-checkin, vc-comment-to-change-log): Doc fix. diff -r 1abf4d6ec488 -r e57454838582 lisp/vc.el --- a/lisp/vc.el Tue Feb 24 12:45:02 1998 +0000 +++ b/lisp/vc.el Tue Feb 24 12:54:05 1998 +0000 @@ -200,9 +200,10 @@ ;;;###autoload (defcustom vc-checkin-hook nil - "*Normal hook (List of functions) run after a checkin is done. + "*Normal hook (list of functions) run after a checkin is done. See `run-hooks'." :type 'hook + :options '(vc-comment-to-change-log) :group 'vc) ;;;###autoload @@ -1101,19 +1102,21 @@ \(if nil increment the current level). The file is either retained with write permissions zeroed, or deleted (according to the value of `vc-keep-workfiles'). If the back-end is CVS, a writable workfile is always kept. -COMMENT is a comment string; if omitted, a buffer is -popped up to accept a comment." +COMMENT is a comment string; if omitted, a buffer is popped up to accept a +comment. + +Runs the normal hook `vc-checkin-hook'." (vc-start-entry file rev comment "Enter a change comment." 'vc-backend-checkin 'vc-checkin-hook)) -;;; Here is a checkin hook that may prove useful to sites using the -;;; ChangeLog facility supported by Emacs. (defun vc-comment-to-change-log (&optional whoami file-name) "Enter last VC comment into change log file for current buffer's file. Optional arg (interactive prefix) non-nil means prompt for user name and site. Second arg is file name of change log. \ -If nil, uses `change-log-default-name'." +If nil, uses `change-log-default-name'. + +May be useful as a `vc-checkin-hook' to update change logs automatically." (interactive (if current-prefix-arg (list current-prefix-arg (prompt-for-change-log-name))))