From 3ee9a09c482ff1ee2280534643c970ecc25676c1 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 18 Jul 2007 08:55:20 +0000 Subject: [PATCH] (change-log-mode): Use fill-nobreak-predicate to avoid that filling introduces lines with a single asterisk. --- lisp/ChangeLog | 9 +++++++++ lisp/add-log.el | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index be77e72e924..ba1fb92aaab 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2007-07-18 Martin Rudalics + + * add-log.el (change-log-mode): Use fill-nobreak-predicate to + avoid that filling introduces lines with a single asterisk. + + * kmacro.el (kmacro-end-macro): When ignoring empty macro + avoid incorrect kmacro-ring-empty-p messages. + Reported by Michael Schierl + 2007-07-17 Michael Albinus * files.el (file-remote-p): Introduce optional parameter diff --git a/lisp/add-log.el b/lisp/add-log.el index 3ec00b81b35..0ff82bba2f5 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -699,6 +699,11 @@ Runs `change-log-mode-hook'. 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 -- 2.39.2