From b8bd990898de3fc96b9773c4c8665bf56f334503 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 16 Feb 2011 23:27:37 -0800 Subject: [PATCH] log-edit.el fix for bug#8057. * lisp/log-edit.el (log-edit-insert-changelog): Fix `log-edit-strip-single-file-name' functionality. --- lisp/ChangeLog | 5 +++++ lisp/log-edit.el | 20 ++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9d8446cef10..638342739e1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-02-17 Glenn Morris + + * log-edit.el (log-edit-insert-changelog): + Fix `log-edit-strip-single-file-name' functionality. (Bug#8057) + 2011-02-14 Chong Yidong * pgg-gpg.el (pgg-gpg-process-region): Bind diff --git a/lisp/log-edit.el b/lisp/log-edit.el index 865b1f31818..373cc31e0cd 100644 --- a/lisp/log-edit.el +++ b/lisp/log-edit.el @@ -621,14 +621,18 @@ regardless of user name or time." (delete-region start end) (rfc822-goto-eoh) (insert "Fixes: " fixes "\n" (if (looking-at "\n") "" "\n"))))) - (goto-char (point-min)) - (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)) - (skip-chars-forward "^():") - (skip-chars-forward ": ") - (delete-region (point-min) (point)))))) + (and log-edit-strip-single-file-name + (progn (rfc822-goto-eoh) + (if (looking-at "\n") (forward-char 1)) + (looking-at "\\*\\s-+")) + (let ((start (point))) + (forward-line 1) + (when (not (re-search-forward "^\\*\\s-+" nil t)) + (goto-char start) + (skip-chars-forward "^():") + (skip-chars-forward ": ") + (delete-region start (point))))) + (goto-char (point-min)))) ;;;; ;;;; functions for getting commit message from ChangeLog a file... -- 2.39.2