aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-02-24 13:08:48 +1100
committerLars Ingebrigtsen2016-02-24 13:08:48 +1100
commitfddbd8ca227d4dbd940e6dd72fecb35e26c3c27b (patch)
treee3c5e551d2c1676699c5980cb6414248454b986b
parent91ea60cf58af2d629cef148faa1916adc4fec5f2 (diff)
downloademacs-fddbd8ca227d4dbd940e6dd72fecb35e26c3c27b.tar.gz
emacs-fddbd8ca227d4dbd940e6dd72fecb35e26c3c27b.zip
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.
-rw-r--r--lisp/vc/add-log.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index 112bc7bd9a1..d6c1fc203db 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -911,8 +911,10 @@ non-nil, otherwise in local time."
911 "\\(\\s \\|[(),:]\\)") 911 "\\(\\s \\|[(),:]\\)")
912 bound t))) 912 bound t)))
913 ;; Add to the existing item for the same file. 913 ;; Add to the existing item for the same file.
914 (re-search-forward "^\\s *$\\|^\\s \\*") 914 (if (re-search-forward "^\\s *$\\|^\\s \\*" nil t)
915 (goto-char (match-beginning 0)) 915 (goto-char (match-beginning 0))
916 (goto-char (point-max))
917 (insert "\n"))
916 ;; Delete excess empty lines; make just 2. 918 ;; Delete excess empty lines; make just 2.
917 (while (and (not (eobp)) (looking-at "^\\s *$")) 919 (while (and (not (eobp)) (looking-at "^\\s *$"))
918 (delete-region (point) (line-beginning-position 2))) 920 (delete-region (point) (line-beginning-position 2)))