]> git.eshelyaron.com Git - emacs.git/commitdiff
log-edit.el fix for bug#8057.
authorGlenn Morris <rgm@gnu.org>
Thu, 17 Feb 2011 07:27:37 +0000 (23:27 -0800)
committerGlenn Morris <rgm@gnu.org>
Thu, 17 Feb 2011 07:27:37 +0000 (23:27 -0800)
* lisp/log-edit.el (log-edit-insert-changelog):
Fix `log-edit-strip-single-file-name' functionality.

lisp/ChangeLog
lisp/log-edit.el

index 9d8446cef10f709cda72269be3d2449eab8b97f1..638342739e14a29e8e7e9b3608ec2cd33a5f520e 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-17  Glenn Morris  <rgm@gnu.org>
+
+       * log-edit.el (log-edit-insert-changelog):
+       Fix `log-edit-strip-single-file-name' functionality.  (Bug#8057)
+
 2011-02-14  Chong Yidong  <cyd@stupidchicken.com>
 
        * pgg-gpg.el (pgg-gpg-process-region): Bind
index 865b1f318184ea366f3ebd960945ccc3769638d6..373cc31e0cda9ef6aa1b56121f772bf0f779a9e0 100644 (file)
@@ -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...