GNU bug report logs -
#16170
Customizable log-edit commit messages
Previous Next
Reported by: Juri Linkov <juri <at> jurta.org>
Date: Tue, 17 Dec 2013 01:36:01 UTC
Severity: wishlist
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 16170-done <at> debbugs.gnu.org (full text, mbox):
> Currently the commit message is hard-coded that might be unsuitable
> to other projects with different conventions. This patch leaves the
> current default unchanged, and moves it to a separate function,
> so a set of messages could by easily configured in `log-edit-hook'.
> Adding `save-excursion' to `log-edit-insert-cvs-template' was
> necessary to not move point set by `message-position-point' in
> `log-edit-insert-message-template'.
This is a useful addition to accompany log-edit-insert-filenames
to insert the names of files that don't require ChangeLog entry,
but should be mentioned in the commit message:
=== modified file 'lisp/vc/log-edit.el'
--- lisp/vc/log-edit.el 2013-12-04 00:37:33 +0000
+++ lisp/vc/log-edit.el 2013-12-18 23:52:35 +0000
@@ -137,6 +137,7 @@
log-edit-insert-cvs-template
log-edit-insert-changelog
log-edit-insert-filenames
+ log-edit-insert-filenames-without-changelog
log-edit-show-files)))
(defcustom log-edit-mode-hook (if (boundp 'vc-log-mode-hook) vc-log-mode-hook)
@@ -664,6 +666,21 @@
(insert "Affected files: \n"
(mapconcat 'identity (log-edit-files) " \n")))
+(defun log-edit-insert-filenames-without-changelog ()
+ "Insert the list of files that have no ChangeLog message."
+ (interactive)
+ (let ((files
+ (delq nil
+ (mapcar
+ (lambda (file)
+ (unless (or (cdr-safe (log-edit-changelog-entries file))
+ (equal (file-name-nondirectory file) "ChangeLog"))
+ file))
+ (log-edit-files)))))
+ (when files
+ (goto-char (point-max))
+ (insert (mapconcat 'identity files ", ") ": "))))
+
(defun log-edit-add-to-changelog ()
"Insert this log message into the appropriate ChangeLog file."
(interactive)
This bug report was last modified 11 years and 213 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.