From 55fd22963f81d0f754d199a25f6b31fea5bd6279 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Mon, 4 Jul 2005 14:40:31 +0000 Subject: [PATCH] Allow WikiWords to be ignored with or "''''". * lisp/muse-mode.el (muse-browse-result): Docfixes. * lisp/muse-wiki.el (muse-wiki-hide-nop-tag): New option that determines whether to hide tags when coloring a Muse buffer. (muse-wiki-wikiword-at-point): Docfix. (muse-wiki-colors-nop-tag): New function that colors tags. (muse-wiki-publish-nop-tag): New function that interprets tags during publishing. (muse-colors-tags, muse-publish-markup-tags): Interpret tags, which keeps the WikiWord that follows it from being interpreted. (muse-publish-markup-regexps): Allow 4 single quotes to function as a WikiWord delimiter. git-archimport-id: mwolson@gnu.org--2005/muse--main--1.0--patch-84 --- ChangeLog | 25 +++++++++++++++++++++++++ lisp/muse-mode.el | 4 ++-- lisp/muse-wiki.el | 19 +++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d277ee..8249af6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,31 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2005/muse--main--1.0 # +2005-07-04 14:40:31 GMT Michael Olson patch-84 + + Summary: + Allow WikiWords to be ignored with or "''''". + Revision: + muse--main--1.0--patch-84 + + * lisp/muse-mode.el (muse-browse-result): Docfixes. + + * lisp/muse-wiki.el (muse-wiki-hide-nop-tag): New option that determines + whether to hide tags when coloring a Muse buffer. + (muse-wiki-wikiword-at-point): Docfix. + (muse-wiki-colors-nop-tag): New function that colors tags. + (muse-wiki-publish-nop-tag): New function that interprets tags + during publishing. + (muse-colors-tags, muse-publish-markup-tags): Interpret tags, + which keeps the WikiWord that follows it from being interpreted. + (muse-publish-markup-regexps): Allow 4 single quotes to function as a + WikiWord delimiter. + + + modified files: + ChangeLog lisp/muse-mode.el lisp/muse-wiki.el + + 2005-07-04 11:20:50 GMT Michael Olson patch-83 Summary: diff --git a/lisp/muse-mode.el b/lisp/muse-mode.el index dff730f..3554fd5 100644 --- a/lisp/muse-mode.el +++ b/lisp/muse-mode.el @@ -333,13 +333,13 @@ Do not rename the page originally referred to." (muse-publish-output-file buffer-file-name (muse-style-element :path style) style))) (if (not (file-readable-p result-path)) - (error "Cannot open output file '%s" result-path) + (error "Cannot open output file '%s'" result-path) (if other-window (find-file-other-window result-path) (let ((func (muse-style-element :browser style t))) (if func (funcall func result-path) - (message "The publishing style %s does not support browsing." + (message "The %s publishing style does not support browsing." style))))))) (defun muse-follow-name-at-point (&optional other-window) diff --git a/lisp/muse-wiki.el b/lisp/muse-wiki.el index b9a9fd2..e241793 100644 --- a/lisp/muse-wiki.el +++ b/lisp/muse-wiki.el @@ -31,6 +31,11 @@ "Options controlling the behavior of Emacs Muse Wiki features." :group 'muse-mode) +(defcustom muse-wiki-hide-nop-tag t + "If non-nil, hide tags when coloring a Muse buffer." + :type boolean + :group 'muse-wiki) + (defcustom muse-wiki-wikiword-regexp (concat "\\<\\(\\(?:[" muse-regexp-upper "][" muse-regexp-lower "]+\\)\\(?:[" @@ -75,6 +80,8 @@ this." "\\)\\(?:\\(?:#\\|::\\)\\(\\sw+\\)\\)?\\>")) (defun muse-wiki-wikiword-at-point () + "Return the WikiWord at point. +This function modifies the match data." (and (looking-at muse-wiki-wikiword-regexp) (match-string 1))) @@ -98,6 +105,8 @@ this." (funcall subst word) (concat subst word)))))) +;; Coloring setup + (eval-after-load 'muse-colors '(progn (defun muse-wiki-colors-wikiword () @@ -113,6 +122,16 @@ this." (muse-link-face (match-string 1))))) (add-text-properties (match-beginning 1) (match-end 0) props))) + (defun muse-wiki-colors-nop-tag (beg end) + (when (and (not muse-wiki-hide-nop-tag) + (<= (- end beg) 5)) + (add-text-properties beg end + '(invisible muse intangible t)))) + + (add-to-list 'muse-colors-tags + '("nop" nil nil muse-wiki-colors-nop-tag) + t) + (add-to-list 'muse-colors-markup '(muse-wiki-interwiki-regexp t muse-wiki-colors-wikiword) t) -- 2.11.4.GIT