From: Roland McGrath Date: Mon, 19 Jul 1993 00:06:14 +0000 (+0000) Subject: (vc-comment-to-change-log): Canonicalize following whitespace after X-Git-Tag: emacs-19.34~11695 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c124b1b47ac9988da3f4c875d826310d4322973a;p=emacs.git (vc-comment-to-change-log): Canonicalize following whitespace after filling, not before. Set END to point at end of indentation. Skip whitespace chars up to END before skipping back to delete. --- diff --git a/lisp/vc.el b/lisp/vc.el index 886576091e1..82dabf60c10 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -614,15 +614,17 @@ If nil, uses `change-log-default-name'." (while (< (point) end) (forward-line 1) (indent-to indentation)) - ;; Canonicalize the white space at the end of the entry so it is - ;; separated from the next entry by a single blank line. - (delete-char (- (skip-syntax-backward " "))) - (or (eobp) (looking-at "\n\n") - (insert "\n")))) + (setq end (point)))) ;; Fill the inserted text, preserving open-parens at bol. (let ((paragraph-separate (concat paragraph-separate "\\|^\\s *\\s(")) (paragraph-start (concat paragraph-start "\\|^\\s *\\s("))) - (fill-region (point) end)))) + (fill-region (point) end)) + ;; Canonicalize the white space at the end of the entry so it is + ;; separated from the next entry by a single blank line. + (skip-syntax-forward " " end) + (delete-char (- (skip-syntax-backward " "))) + (or (eobp) (looking-at "\n\n") + (insert "\n")))) (defun vc-finish-logentry (&optional nocomment)