[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3571: 23.0.94; log-edit-insert-changelog option for not stripping fi
bug#3571: 23.0.94; log-edit-insert-changelog option for not stripping filename
Mon, 15 Jun 2009 12:41:21 +0100
Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)
I have grown into the habit of writing ChangeLog entries while writing
code, and then using them for the commit message when I commit, pressing
C-c C-a in the log buffer. This works great, except when I'm committing
a single file. In that case, log-edit strips the file name from the
changelog entry, but as the version control systems I use are
changeset-based rather than file-based, I would like the file name to
I've been using the attached patch for a while with good results.
>From 0bccc332a7e04f68d47f2b66bd6e0d425c4389c8 Mon Sep 17 00:00:00 2001
From: Magnus Henoch <address@hidden>
Date: Wed, 27 May 2009 17:19:13 +0100
Subject: [PATCH] * log-edit.el (log-edit-strip-single-file-name): New variable.
(log-edit-insert-changelog): Check its value.
lisp/log-edit.el | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/lisp/log-edit.el b/lisp/log-edit.el
index 4ca1372..7552e3c 100644
@@ -148,6 +148,11 @@ can be obtained from `log-edit-files'."
:type '(hook :options (log-edit-set-common-indentation
+(defcustom log-edit-strip-single-file-name t
+ "If non-nil, remove file name from single-file log entries."
+ :group 'log-edit
+ :type 'boolean)
(defvar cvs-changelog-full-paragraphs t)
@@ -521,13 +526,14 @@ regardless of user name or time."
- (when (looking-at "\\*\\s-+")
- (forward-line 1)
- (when (not (re-search-forward "^\\*\\s-+" nil t))
- (goto-char (point-min))
- (skip-chars-forward "^():")
- (skip-chars-forward ": ")
- (delete-region (point-min) (point)))))
+ (when log-edit-strip-single-file-name
+ (when (looking-at "\\*\\s-+")
+ (forward-line 1)
+ (when (not (re-search-forward "^\\*\\s-+" nil t))
+ (goto-char (point-min))
+ (skip-chars-forward "^():")
+ (skip-chars-forward ": ")
+ (delete-region (point-min) (point))))))
;;;; functions for getting commit message from ChangeLog a file...
|[Prev in Thread]
||[Next in Thread]|
- bug#3571: 23.0.94; log-edit-insert-changelog option for not stripping filename,
Magnus Henoch <=