# HG changeset patch # User Martin Rudalics # Date 1184748883 0 # Node ID d32ff111504ca93d1b77044bb3e59407dfcddd60 # Parent 7f057e1b1d1905dd2182af846a0c6af953fbd629 (change-log-mode): Use fill-nobreak-predicate to avoid that filling introduces lines with a single asterisk. diff -r 7f057e1b1d19 -r d32ff111504c lisp/add-log.el --- a/lisp/add-log.el Wed Jul 18 08:46:42 2007 +0000 +++ b/lisp/add-log.el Wed Jul 18 08:54:43 2007 +0000 @@ -699,6 +699,11 @@ show-trailing-whitespace t) (set (make-local-variable 'fill-paragraph-function) 'change-log-fill-paragraph) + ;; Avoid that filling leaves behind a single "*" on a line. + (add-hook 'fill-nobreak-predicate + '(lambda () + (looking-back "^\\s *\\*\\s *" (line-beginning-position))) + nil t) (set (make-local-variable 'indent-line-function) 'change-log-indent) (set (make-local-variable 'tab-always-indent) nil) ;; We really do want "^" in paragraph-start below: it is only the