diff options
author | Glenn Morris <rgm@gnu.org> | 2011-02-16 23:27:37 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-02-16 23:27:37 -0800 |
commit | b8bd990898de3fc96b9773c4c8665bf56f334503 (patch) | |
tree | 22319e3a904cc475d34115ee8c9da0997c3c0441 | |
parent | b9c82730f91a85fbeeb68edd0310d33d8f8f5ff7 (diff) | |
download | emacs-b8bd990898de3fc96b9773c4c8665bf56f334503.tar.gz |
log-edit.el fix for bug#8057.
* lisp/log-edit.el (log-edit-insert-changelog):
Fix `log-edit-strip-single-file-name' functionality.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | 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 <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 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... |