From 31764e153f533f25e36586e0606395cfe77fac39 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 19 Aug 2009 19:55:58 +0000 Subject: [PATCH] * log-edit.el (log-edit-strip-single-file-name): New var. (log-edit-insert-changelog): Use it. --- etc/NEWS | 3 +++ lisp/ChangeLog | 6 ++++++ lisp/log-edit.el | 6 +++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index b06fa3e17a4..3d4fa59a8ca 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -142,6 +142,9 @@ Signed-off-by line when committing. **** vc-dir displays the stash status +*** log-edit-strip-single-file-name controls whether or not single filenames +are stripped when copying text from the ChangeLog to the *VC-Log* buffer. + ** Calendar and diary --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d8ffb2e9169..9d178f36742 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,12 @@ +2009-08-19 Magnus Henoch + + * log-edit.el (log-edit-strip-single-file-name): New var. + (log-edit-insert-changelog): Use it. + 2009-08-19 Stefan Monnier * subr.el (read-passwd): Use read-key so keypad keys work as well. + Bug#3287 * help.el (help-print-return-message): Rename from print-help-return-message. diff --git a/lisp/log-edit.el b/lisp/log-edit.el index 4ca13726c07..a9816ea6649 100644 --- a/lisp/log-edit.el +++ b/lisp/log-edit.el @@ -148,6 +148,10 @@ can be obtained from `log-edit-files'." :type '(hook :options (log-edit-set-common-indentation log-edit-add-to-changelog))) +(defcustom log-edit-strip-single-file-name t + "If non-nil, remove file name from single-file log entries." + :type 'boolean) + (defvar cvs-changelog-full-paragraphs t) (make-obsolete-variable 'cvs-changelog-full-paragraphs 'log-edit-changelog-full-paragraphs @@ -521,7 +525,7 @@ regardless of user name or time." (log-edit-insert-changelog-entries (log-edit-files))) (log-edit-set-common-indentation) (goto-char (point-min)) - (when (looking-at "\\*\\s-+") + (when (and log-edit-strip-single-file-name (looking-at "\\*\\s-+")) (forward-line 1) (when (not (re-search-forward "^\\*\\s-+" nil t)) (goto-char (point-min)) -- 2.11.4.GIT