changeset 81943:d32ff111504c

(change-log-mode): Use fill-nobreak-predicate to avoid that filling introduces lines with a single asterisk.
author Martin Rudalics <rudalics@gmx.at>
date Wed, 18 Jul 2007 08:54:43 +0000
parents 7f057e1b1d19
children 1d6b018f8909
files lisp/add-log.el
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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