From 9066c327ff447e37b5463dca0d36ab94538f150f Mon Sep 17 00:00:00 2001 From: "Michael W. Olson" Date: Tue, 18 Sep 2007 11:23:12 -0400 Subject: [PATCH] muse-mode: Fix bug with filling and paragraphs next to headings * lisp/muse-mode.el (muse-mode): Fix bug involving filling and paragraphs next to headings. Thanks to Gregory Collins for the initial patch, which I modified. --- ChangeLog | 6 ++++++ lisp/muse-mode.el | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2af41a..c6a9178 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-09-18 Michael Olson + + * lisp/muse-mode.el (muse-mode): Fix bug involving filling and + paragraphs next to headings. Thanks to Gregory Collins for the + initial patch, which I modified. + 2007-09-10 Michael Olson * Makefile (elpa): Use texi/dir-template rather than echoing lines diff --git a/lisp/muse-mode.el b/lisp/muse-mode.el index 7c9f283..9eeb878 100644 --- a/lisp/muse-mode.el +++ b/lisp/muse-mode.el @@ -38,6 +38,9 @@ ;; muse-next-reference and muse-previous-reference involving links ;; that begin at point 1. +;; Gregory Collins (greg AT gregorycollins DOT net) fixed a bug with +;; paragraph separation and headings when filling. + ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -227,11 +230,15 @@ index at intervals." ;; Make fill work nicely with item lists (let ((regexp (concat "\\s-+\\(-\\|[0-9]+\\.\\)\\s-+" "\\|\\[[0-9]+\\]\\s-*" - "\\|.*\\s-*::\\s-+"))) + "\\|.*\\s-*::\\s-+" + "\\|\\*+\\s-+"))) (set (make-local-variable 'adaptive-fill-regexp) (concat regexp "\\|\\s-*")) (set (make-local-variable 'paragraph-start) - (concat paragraph-start "\\|" regexp))) + (concat paragraph-start "\\|" regexp)) + (set (make-local-variable 'paragraph-separate) + (concat paragraph-separate "\\|\\*+\\s-+"))) + ;; Comment syntax is `; comment' (set (make-local-variable 'comment-start) "; ") -- 2.11.4.GIT