From 2639b2f2fbddb785707a9b1f7599f43c7b77fb22 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Sun, 6 Aug 2006 23:20:09 +0000 Subject: [PATCH] Fix #5359: Word wrap ignores definition lists. * lisp/muse-colors.el (muse-colors-tags): Allow to take attributes. (muse-colors-lisp-tag): Figure out where the tag and its delimiter are instead of hard-coding it. * lisp/muse-mode.el (muse-mode): Make filling definition lists work better. This should fix #5359. * NEWS: Update through patch-84. git-archimport-id: mwolson@gnu.org--2006/muse--main--1.0--patch-175 --- NEWS | 70 ++++++++++++++++++++++++++++++++++++++++++++--------- lisp/muse-colors.el | 30 ++++++++++++++--------- lisp/muse-mode.el | 7 +++--- 3 files changed, 81 insertions(+), 26 deletions(-) diff --git a/NEWS b/NEWS index a29644e..90d5ae6 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,21 @@ and Muse publishing. *** Make sure spaces in URLs get escaped properly. +** HTTP daemon (contrib/httpd.el) + +*** Update this to work with newer versions of Emacs. + +*** Fix a paragraph detection bug for paragraphs that occur after +verses. + +** Journal (lisp/muse-journal.el) + +*** New option: muse-journal-rss-heading-regexp. +Determine the regexp to use when searching for an RSS heading. + +*** Make sure that the date is in a format that RSS readers +can handle. + ** LaTeX publishing (lisp/muse-latex.el) *** Improve escaping of specials. @@ -46,6 +61,14 @@ fashion. **** Mention how to customize the WikiName recognition. +*** Emphasizing Text + +**** Mention the tag. + +*** Extending Muse + +**** Move "Common Elements" and "Deriving Styles" chapters here. + ** Muse Mode (lisp/muse-mode.el) *** `C-c TAB' now inserts an object, prompting the user for which type. @@ -61,18 +84,6 @@ that the prompt you get when you hit `C-c TAB' will not change. `C->' increases list item indentation. `C-<' decreases list item indentation. -*** New option: muse-colors-inline-images. -This determines whether or not to inline an image. The default is to -enable this behavior. - -**** `C-c C-i' toggles whether images are inlined. - -**** New option: muse-colors-inline-image-method. -This determines how to find an image that we want to inline. The -default is to look in the current directory. If set to -'muse-colors-use-publishing-directory, it will look in the directory -where the current page will be published. - *** Slightly improvement speed of flyspell integration *** Implement searching through Muse files. @@ -91,6 +102,31 @@ command for details. *** Don't require muse-publish.el, since publishing and viewing Muse files are supposed to be completely separable. +*** Speed up searching for next and previous references. + +*** Make filling definition lists work better. + +** Muse Mode highlighting (lisp/muse-colors.el) + +*** New option: muse-colors-inline-images. +This determines whether or not to inline an image. The default is to +enable this behavior. + +**** `C-c C-i' toggles whether images are inlined. + +**** New option: muse-colors-inline-image-method. +This determines how to find an image that we want to inline. The +default is to look in the current directory. If set to +'muse-colors-use-publishing-directory, it will look in the directory +where the current page will be published. + +*** Make faces conform the namespace better. +`muse-link-face' is renamed to `muse-link'. +`muse-bad-link-face' is renamed to `muse-bad-link'. +`muse-verbatim-face' is renamed to `muse-verbatim'. + +*** Handle muse-emphasis faces better. + ** New modules *** lisp/muse-backlink.el -- Provide backlink support for Muse. @@ -118,6 +154,9 @@ to switch to a given Muse project and execute some code. This fixes an annoyance where Muse prompts to save BBDB and ERC buffers before publishing. +*** If we cannot find a project to publish, indicate this in an +error message. This fixes an infinite loop. + ** Publishing (lisp/muse-publish.el) *** Implement escaping of specials throughout the entire document. @@ -164,6 +203,13 @@ than normal characters. See `muse-xml-decide-specials' in muse-xml-common.el for details. This functionality already exists for escaping specials in strings. +*** Fix an infinite loop problem. + +*** Preserve whitespace around emdash. +This allows for more flexibility, since some people seem to prefer to +have the emdash directly against the surrounding text, while others +like it to be spaced. + *** New tags, see the Tag Summary section in the manual for details **** -- Designate entire regions as comments. diff --git a/lisp/muse-colors.el b/lisp/muse-colors.el index 3baf85a..74fcae8 100644 --- a/lisp/muse-colors.el +++ b/lisp/muse-colors.el @@ -527,7 +527,7 @@ of the functions listed in `muse-colors-markup'." '(("example" t nil muse-colors-example-tag) ("code" t nil muse-colors-example-tag) ("verbatim" t nil muse-colors-literal-tag) - ("lisp" t nil muse-colors-lisp-tag) + ("lisp" t t muse-colors-lisp-tag) ("literal" t nil muse-colors-literal-tag)) "A list of tag specifications for specially highlighting text. XML-style tags are the best way to add custom highlighting to Muse. @@ -621,19 +621,27 @@ Functions should not modify the contents of the buffer." (> end (point))))) (add-text-properties beg end `(font-lock-multiline ,multi)))) -(defun muse-colors-lisp-tag (beg end) +(defun muse-colors-lisp-tag (beg end attrs) (if (not muse-colors-evaluate-lisp-tags) (muse-colors-literal-tag beg end) (muse-unhighlight-region beg end) - (add-text-properties - beg end - (list 'font-lock-multiline t - 'display (muse-eval-lisp - (concat "(progn " - (buffer-substring-no-properties (+ beg 6) - (- end 7)) - ")")) - 'intangible t)))) + (let (beg-lisp end-lisp) + (save-match-data + (goto-char beg) + (setq beg-lisp (and (looking-at "<[^ ]+[^>]*>") + (match-end 0))) + (goto-char end) + (setq end-lisp (and (muse-looking-back "]*>") + (match-beginning 0)))) + (add-text-properties + beg end + (list 'font-lock-multiline t + 'display (muse-eval-lisp + (concat + "(progn " + (buffer-substring-no-properties beg-lisp end-lisp) + ")")) + 'intangible t))))) (defvar muse-mode-local-map (let ((map (make-sparse-keymap))) diff --git a/lisp/muse-mode.el b/lisp/muse-mode.el index b7bd646..52e7985 100644 --- a/lisp/muse-mode.el +++ b/lisp/muse-mode.el @@ -220,10 +220,11 @@ index at intervals." ;; Make fill work nicely with item lists (set (make-local-variable 'adaptive-fill-regexp) (concat "\\s-+\\(-\\|[0-9]+\\.\\)\\s-+\\|\\[[0-9]+\\]\\s-*" - "\\|\\s-*::\\s-*\\|\\s-*")) + "\\|.*\\s-*::\\s-+\\|\\s-*")) (set (make-local-variable 'paragraph-start) - (concat paragraph-start "\\|\\s-+\\(-\\|[0-9]+\\.\\)\\s-+" - "\\|\\[[0-9]+\\]\\s-*\\|\\s-*::\\s-*")) + (concat paragraph-start + "\\|\\s-+\\(-\\|[0-9]+\\.\\)\\s-+\\|\\[[0-9]+\\]\\s-*" + "\\|.*\\s-*::\\s-+")) ;; Comment syntax is `; comment' (set (make-local-variable 'comment-start) "; ") -- 2.11.4.GIT