From f9855a3dba4d758c13742a9e4ae0a05add62e3f3 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Wed, 4 Jan 2006 00:37:27 +0000 Subject: [PATCH] Nested list fix. * lisp/muse-publish.el (muse-publish-surround-text): Preserve indentation of nested-list items until they are processed. git-archimport-id: mwolson@gnu.org--2005/muse--main--1.0--patch-343 --- ChangeLog | 14 ++++++++++++++ lisp/muse-publish.el | 12 +++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7aec179..7281bcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,20 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2005/muse--main--1.0 # +2006-01-04 00:37:27 GMT Michael Olson patch-343 + + Summary: + Nested list fix. + Revision: + muse--main--1.0--patch-343 + + * lisp/muse-publish.el (muse-publish-surround-text): Preserve indentation + of nested-list items until they are processed. + + modified files: + ChangeLog lisp/muse-publish.el + + 2006-01-04 00:00:52 GMT Michael Olson patch-342 Summary: diff --git a/lisp/muse-publish.el b/lisp/muse-publish.el index e96c1e9..7b11a7a 100644 --- a/lisp/muse-publish.el +++ b/lisp/muse-publish.el @@ -961,8 +961,11 @@ The following contexts exist in Muse. (unless indent (setq indent (concat "[" muse-regexp-blank "]+"))) (when post-indent - (setq post-indent (concat " \\{0," (number-to-string post-indent) "\\}"))) + (setq post-indent (concat indent " \\{0," (number-to-string post-indent) + "\\}"))) (let ((continue t) + (list-item (format muse-list-item-regexp + (concat "[" muse-regexp-blank "]+"))) beg) (while continue (muse-insert-markup beg-tag) @@ -972,10 +975,9 @@ The following contexts exist in Muse. (narrow-to-region beg (point)) (goto-char (point-min)) (while (< (point) (point-max)) - (when (looking-at (concat indent post-indent)) - (replace-match "") - (when (looking-at "-\\|[0-9]+\\.") - (insert " "))) + (when (and (not (looking-at list-item)) + (looking-at post-indent)) + (replace-match "")) (forward-line 1)) (skip-chars-backward (concat muse-regexp-blank "\n")) (muse-insert-markup-end-list end-tag) -- 2.11.4.GIT