# HG changeset patch # User Stefan Monnier # Date 958875206 0 # Node ID 09b4758f4aea7c2c7c362da6ff62b4aba696f9ae # Parent 49e8918cab44281a0a592ec4dfa6b55509898193 (log-edit-done): Cleanup trailing empty lines. (log-edit-insert-changelog): Drop `:' as well. diff -r 49e8918cab44 -r 09b4758f4aea lisp/log-edit.el --- a/lisp/log-edit.el Sun May 21 02:12:34 2000 +0000 +++ b/lisp/log-edit.el Sun May 21 02:13:26 2000 +0000 @@ -5,7 +5,7 @@ ;; Author: Stefan Monnier ;; Keywords: pcl-cvs cvs commit log ;; Version: $Name: $ -;; Revision: $Id: log-edit.el,v 1.3 2000/03/26 23:05:12 monnier Exp $ +;; Revision: $Id: log-edit.el,v 1.4 2000/05/10 22:20:51 monnier Exp $ ;; This file is part of GNU Emacs. @@ -189,6 +189,12 @@ "Finish editing the log message and commit the files. If you want to abort the commit, simply delete the buffer." (interactive) + ;; Get rid of trailing empty lines + (goto-char (point-max)) + (skip-syntax-backward " ") + (when (equal (char-after) ?\n) (forward-char 1)) + (delete-region (point) (point-max)) + ;; Check for final newline (if (and (> (point-max) 1) (/= (char-after (1- (point-max))) ?\n) (or (eq log-edit-require-final-newline t) @@ -242,6 +248,7 @@ (when (not (re-search-forward "^\\*\\s-+" nil t)) (goto-char (point-min)) (skip-chars-forward "^():") + (skip-chars-forward ": ") (delete-region (point-min) (point))))) (defun log-edit-mode-help ()