youngs  committed bec6257

2001-07-14 Steve Youngs <>

* ibuffer.el: Replaced with newer version that was in

2001-07-14 Kevin Gallagher <>

* Import version 4.0.

2001-06-06 Mark Thomas <>

* nnmail.el (nnmail-fix-eudora-headers): Change the In-Reply-To
fix so it works with older versions of XEmacs.

2001-07-14 Steve Youngs <>

* emacsbug.el (report-emacs-bug-address): Change address to

2001-06-06 Raymond Toy <>

* cvs-edit.el (cvs-edit-done): Check for a null vc-comment-ring
and initialize if necessary.

2001-06-21 Jeff Mincy <>

* diff-mode.el (vc-backend-diff): Fix when default-major-mode is text-mode,
also enabled font-lock

2001-07-14 I. Sheldon <>

* vc.el (vc-populate-vc-log-hook): New.
(vc-log-template): New.
(vc-start-entry): Use vc-populate-vc-log-hook.
(vc-populate-vc-log-with-template): New.
(vc-populate-vc-log-with-goto-first-eol): New.

2001-07-14 Steve Youngs <>

* ibuffer.el: Move to edit-utils package.

* Makefile (ELCS): Remove ibuffer.elc

2001-06-16 Simon Josefsson <>

* zenirc.el (zenirc-font-lock-keywords): Some font-lock defaults.
(toplevel): Put font-lock-defaults on mode.
(zenirc-mode): Allow font-lock initialization.

  • Participants
  • Parent commits 8f5a2e9
  • Branches default

Comments (0)

Files changed (2)

+2001-07-14  I. Sheldon  <>
+	* vc.el (vc-populate-vc-log-hook): New.
+	(vc-log-template): New.
+	(vc-start-entry): Use vc-populate-vc-log-hook.
+	(vc-populate-vc-log-with-template): New.
+	(vc-populate-vc-log-with-goto-first-eol): New.
 2001-04-26  Albert L. Ting  <>
 	* vc.el (vc-do-command): 
   :group 'vc)
+(defcustom vc-populate-vc-log-hook nil
+  "*Normal hook (list of functions) run after the VC log buffer is created.  
+This can be used to insert a template in to the VC log buffer for the user
+to edit.
+For example the following will prepare the VC log buffer with the
+text `BugID:' and leave the cursor ready to enter the bug number.
+(add-hook 'vc-after-log-create-hook 'vc-populate-vc-log-with-goto-first-eol)
+(add-hook 'vc-after-log-create-hook 'vc-populate-vc-log-with-template)
+(setq vc-log-template \"BugID: \\n\")
+See `run-hooks' and `vc-populate-vc-log-with-template'."
+  :type 'hook
+  :group 'vc)
+(defcustom vc-log-template ""
+  "*Template text to insert in to a version control log.
+See `vc-populate-vc-log-hook'."
+  :type 'string
+  :group 'vc)
 (defcustom vc-annotate-mode-hook nil
   "*Hooks to run when VC-Annotate mode is turned on."
   :type 'hook
     (if comment
 	(set-buffer (get-buffer-create "*VC-log*"))
       (pop-to-buffer (get-buffer-create "*VC-log*")))
+    (run-hooks 'vc-populate-vc-log-hook)
     (set (make-local-variable 'vc-parent-buffer) parent)
     (set (make-local-variable 'vc-parent-buffer-name)
 	 (concat " from " (buffer-name vc-parent-buffer)))
            (error "Couldn't analyze cvs update result"))))
     (message "Merging changes into %s...done" file)))
+(defun vc-populate-vc-log-with-template ()
+  "*Populate the VC log with a default template for the user to edit.
+See also `vc-populate-vc-log-hook'."
+  (save-excursion
+    (if (= (point-min) (point-max))
+	;; Only do if the buffer is already empty Otherwise the user
+	;; may end up with multiple copies in the buffer.
+	(insert-string vc-log-template))))
+(defun vc-populate-vc-log-with-goto-first-eol ()
+  "*Go to the end of the first line in the VC log.
+This is often used in conjuction with vc-populate-vc-log-with-template
+to ensure the cursor is left at the correct point.
+See also `vc-populate-vc-log-hook'."
+  (goto-char (point-min))
+  (end-of-line))
 (defun vc-check-headers ()
   "Check if the current file has any headers in it."