mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-18 02:47:36 +00:00
Fix error in add-change-log-entry when the entry has no newline
* lisp/vc/add-log.el (add-change-log-entry): The entry in the ChangeLog may end without a new line starting with blanks.
This commit is contained in:
parent
91ea60cf58
commit
fddbd8ca22
1 changed files with 4 additions and 2 deletions
|
|
@ -911,8 +911,10 @@ non-nil, otherwise in local time."
|
|||
"\\(\\s \\|[(),:]\\)")
|
||||
bound t)))
|
||||
;; Add to the existing item for the same file.
|
||||
(re-search-forward "^\\s *$\\|^\\s \\*")
|
||||
(goto-char (match-beginning 0))
|
||||
(if (re-search-forward "^\\s *$\\|^\\s \\*" nil t)
|
||||
(goto-char (match-beginning 0))
|
||||
(goto-char (point-max))
|
||||
(insert "\n"))
|
||||
;; Delete excess empty lines; make just 2.
|
||||
(while (and (not (eobp)) (looking-at "^\\s *$"))
|
||||
(delete-region (point) (line-beginning-position 2)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue