From 7180dd04b8d55470755827a1942a8f14f97897d6 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Fri, 13 Jan 2006 00:40:30 +0000 Subject: [PATCH] Merged from mwolson@gnu.org--2005 (patch 317) * lisp/muse-publish.el (muse-publish-surround-text): Fix several typos. * lisp/muse.el (muse-eval-lisp): Insert this as a comment, not hardcoded HTML. Patches applied: * mwolson@gnu.org--2005/muse--main--1.0--patch-317 Get rid of muse-regexp-space. Standardize anchor markup somewhat. git-archimport-id: mwolson@gnu.org--2005/muse--rel--3.02--patch-51 --- ChangeLog | 28 ++++++++++++++++++++++++++++ lisp/muse-colors.el | 8 ++++---- lisp/muse-convert.el | 4 +--- lisp/muse-docbook.el | 2 +- lisp/muse-html.el | 2 +- lisp/muse-latex.el | 2 +- lisp/muse-mode.el | 6 ++---- lisp/muse-protocols.el | 4 ++-- lisp/muse-publish.el | 43 +++++++++++++++++-------------------------- lisp/muse-regexps.el | 18 ++---------------- lisp/muse-texinfo.el | 2 +- lisp/muse-xml.el | 2 +- lisp/muse.el | 2 +- 13 files changed, 62 insertions(+), 61 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2605b31..3e4ef04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,34 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2005/muse--rel--3.02 # +2006-01-13 00:40:30 GMT Michael Olson patch-51 + + Summary: + Merged from mwolson@gnu.org--2005 (patch 317) + Revision: + muse--rel--3.02--patch-51 + + * lisp/muse-publish.el (muse-publish-surround-text): Fix several typos. + + * lisp/muse.el (muse-eval-lisp): Insert this as a comment, not hardcoded + HTML. + + Patches applied: + + * mwolson@gnu.org--2005/muse--main--1.0--patch-317 + Get rid of muse-regexp-space. Standardize anchor markup somewhat. + + modified files: + ChangeLog lisp/muse-colors.el lisp/muse-convert.el + lisp/muse-docbook.el lisp/muse-html.el lisp/muse-latex.el + lisp/muse-mode.el lisp/muse-protocols.el lisp/muse-publish.el + lisp/muse-regexps.el lisp/muse-texinfo.el lisp/muse-xml.el + lisp/muse.el + + new patches: + mwolson@gnu.org--2005/muse--main--1.0--patch-317 + + 2006-01-06 20:44:29 GMT Michael Olson patch-50 Summary: diff --git a/lisp/muse-colors.el b/lisp/muse-colors.el index 554addf..d64e06b 100644 --- a/lisp/muse-colors.el +++ b/lisp/muse-colors.el @@ -331,7 +331,7 @@ whether progress messages should be displayed to the user." ("\\*\\{1,5\\}" ?* muse-colors-emphasized) ;; make underlined text appear underlined - (,(concat "_[^" muse-regexp-space "_]") + (,(concat "_[^" muse-regexp-blank "_\n]") ?_ muse-colors-underlined) ("^#title " ?\# muse-colors-title) @@ -339,7 +339,7 @@ whether progress messages should be displayed to the user." (muse-explicit-link-regexp ?\[ muse-colors-explicit-link) ;; render in teletype and suppress further parsing - (,(concat "=[^" muse-regexp-space "=]") ?= muse-colors-verbatim) + (,(concat "=[^" muse-regexp-blank "=\n]") ?= muse-colors-verbatim) ;; highlight any markup tags encountered (muse-tag-regexp ?\< muse-colors-custom-tags) @@ -510,8 +510,8 @@ Functions should not modify the contents of the buffer." (let ((attrstr (match-string 2))) (while (and attrstr (string-match (concat "\\([^" - muse-regexp-space - "=]+\\)\\(=\"" + muse-regexp-blank + "=\n]+\\)\\(=\"" "\\([^\"]+\\)\"\\)?") attrstr)) (let ((attr (cons (downcase diff --git a/lisp/muse-convert.el b/lisp/muse-convert.el index 36bcd26..facd8dc 100644 --- a/lisp/muse-convert.el +++ b/lisp/muse-convert.el @@ -41,9 +41,7 @@ (insert ", " citation ", " pages)) (insert "\n") (goto-char beg) - (while (re-search-forward (concat "p.\\\\[" - muse-regexp-space - "]+") + (while (re-search-forward (concat "p.\\\\[" muse-regexp-blank "\n]+") nil t) (replace-match "p.")) (goto-char beg) diff --git a/lisp/muse-docbook.el b/lisp/muse-docbook.el index 3d6cd75..a09e837 100644 --- a/lisp/muse-docbook.el +++ b/lisp/muse-docbook.el @@ -255,7 +255,7 @@ match is found, `muse-docbook-charset-default' is used instead." (defun muse-docbook-insert-anchor (anchor) "Insert an anchor, either before the next word, or within a tag." (unless (get-text-property (match-end 1) 'noemphasis) - (skip-chars-forward muse-regexp-space) + (skip-chars-forward (concat muse-regexp-blank "\n")) (when (looking-at "<\\([^ />]+\\)>") (goto-char (match-end 0))) (insert "\n"))) diff --git a/lisp/muse-html.el b/lisp/muse-html.el index 1168846..b827cd1 100644 --- a/lisp/muse-html.el +++ b/lisp/muse-html.el @@ -424,7 +424,7 @@ system to an associated HTML coding system. If no match is found, (defun muse-html-insert-anchor (anchor) "Insert an anchor, either around the word at point, or within a tag." (unless (get-text-property (match-end 1) 'noemphasis) - (skip-chars-forward muse-regexp-space) + (skip-chars-forward (concat muse-regexp-blank "\n")) (if (looking-at "<\\([^ />]+\\)>") (let ((tag (match-string 1))) (goto-char (match-end 0)) diff --git a/lisp/muse-latex.el b/lisp/muse-latex.el index c10fafa..8101d4a 100644 --- a/lisp/muse-latex.el +++ b/lisp/muse-latex.el @@ -276,7 +276,7 @@ This applies to text in \\texttt{} regions." If the anchor occurs at the end of a line, ignore it." (unless (or (bolp) ; point is placed after newline if anchor at end (get-text-property (match-end 1) 'noemphasis)) - (skip-chars-forward muse-regexp-space) + (skip-chars-forward (concat muse-regexp-blank "\n")) (if (looking-at "<\\([^ />]+\\)>") (let ((tag (match-string 1))) (goto-char (match-end 0)) diff --git a/lisp/muse-mode.el b/lisp/muse-mode.el index 416c810..a78e94c 100644 --- a/lisp/muse-mode.el +++ b/lisp/muse-mode.el @@ -246,8 +246,7 @@ This is used to keep links from being improperly colorized by flyspell." (let ((end (point))) (save-excursion (save-restriction - (skip-chars-backward (concat "^\\[" - muse-regexp-space)) + (skip-chars-backward (concat "^\\[\n" muse-regexp-blank)) (narrow-to-region (point) end)) (pcomplete-parse-buffer-arguments)))) @@ -276,8 +275,7 @@ This is used to keep links from being improperly colorized by flyspell." (muse-handle-explicit-link)) (goto-char here) ;; Check for bare URL or other link type - (skip-chars-backward (concat "^'\"<>{}(\n" - muse-regexp-space)) + (skip-chars-backward (concat "^'\"<>{}(\n" muse-regexp-blank)) (and (looking-at muse-implicit-link-regexp) (muse-handle-implicit-link))))))) diff --git a/lisp/muse-protocols.el b/lisp/muse-protocols.el index 44ba696..ce0debf 100644 --- a/lisp/muse-protocols.el +++ b/lisp/muse-protocols.el @@ -60,8 +60,8 @@ This is autogenerated from `muse-url-protocols'.") (defun muse-update-url-regexp (sym value) (setq muse-url-regexp (concat "\\<\\(" (mapconcat 'car value "\\|") "\\)" - "[^][" muse-regexp-space "\"'()<>^`{}]*" - "[^][" muse-regexp-space "\"'()<>^`{}.,;]+")) + "[^][" muse-regexp-blank "\"'()<>^`{}\n]*" + "[^][" muse-regexp-blank "\"'()<>^`{}.,;\n]+")) (set sym value)) (defcustom muse-url-protocols diff --git a/lisp/muse-publish.el b/lisp/muse-publish.el index fa31ed1..35f926b 100644 --- a/lisp/muse-publish.el +++ b/lisp/muse-publish.el @@ -109,16 +109,11 @@ If non-nil, publish comments using the markup of the current style." (1500 "^\\(\\W*\\)#\\(\\S-+\\)\\s-*" 0 anchor) ;; emphasized or literal text - (1600 ,(concat - "\\(^\\|[-[" - muse-regexp-space - "<('`\"]\\)\\(=[^=" - muse-regexp-space - "]\\|_[^_" - muse-regexp-space - "]\\|\\*+[^*" - muse-regexp-space - "]\\)") + (1600 ,(concat "\\(^\\|[-[" muse-regexp-blank + "<('`\"\n]\\)\\(=[^=" muse-regexp-blank + "\n]\\|_[^_" muse-regexp-blank + "\n]\\|\\*+[^*" muse-regexp-blank + "\n]\\)") 2 word) ;; headings, outline-mode style @@ -700,8 +695,8 @@ the file is published no matter what." (let ((attrstr (match-string 2))) (while (and attrstr (string-match (concat "\\([^" - muse-regexp-space - "=]+\\)\\(=\"\\" + muse-regexp-blank + "=\n]+\\)\\(=\"\\" "([^\"]+\\)\"\\)?") attrstr)) (let ((attr (cons (downcase @@ -887,21 +882,21 @@ If IGNORE-READ-ONLY is non-nil, ignore the read-only property." (insert (muse-markup-text 'fn-sep))) (defun muse-publish-surround-text (beg-tag end-tag move-func) - (let (beg) - (skip-chars-backward muse-regexp-space) + (let ((beg (point))) + (skip-chars-backward (concat muse-regexp-blank "\n")) (delete-region (point) beg) (insert "\n\n" beg-tag) (setq beg (point)) (funcall move-func) (save-restriction - (narrow-to-region (beg (point))) + (narrow-to-region beg (point)) (goto-char (point-min)) (while (< (point) (point-max)) (if (looking-at "^\\s-+") (replace-match "")) (forward-line 1))) (setq beg (point)) - (skip-chars-backward muse-regexp-space) + (skip-chars-backward (concat muse-regexp-blank "\n")) (delete-region (point) beg)) (insert end-tag "\n")) @@ -947,19 +942,15 @@ like read-only from being inadvertently deleted." (save-match-data (save-excursion (forward-line 1) - (while (looking-at (concat "^\\([" - muse-regexp-blank - "]*\\)[^" - muse-regexp-space - "]")) + (while (looking-at (concat "^\\([" muse-regexp-blank + "]*\\)[^" muse-regexp-blank + "\n]")) (delete-region (match-beginning 1) (match-end 1)) (forward-line 1)))) (save-match-data - (when (re-search-forward (concat "[" - muse-regexp-space - "]+::[" - muse-regexp-space - "]+") + (when (re-search-forward (concat "[" muse-regexp-blank + "\n]+::[" muse-regexp-blank + "\n]+") nil t) (replace-match (muse-markup-text 'start-dde)))) (muse-forward-paragraph) diff --git a/lisp/muse-regexps.el b/lisp/muse-regexps.el index 1623eb3..090dd09 100644 --- a/lisp/muse-regexps.el +++ b/lisp/muse-regexps.el @@ -95,20 +95,6 @@ the time." :options '("[:blank:]" " \t") :group 'muse-regexp) -(defcustom muse-regexp-space - (if (muse-extreg-usable-p) - "[:space:]" - " \t\n") - "Regexp to use in place of \"[:space:]\". -This should be something that matches spaces, tabs, and newlines. - -It is like a regexp, but should be embeddable inside brackets. -muse will detect the appropriate value correctly most of -the time." - :type 'string - :options '("[:space:]" " \t\n") - :group 'muse-regexp) - (defcustom muse-regexp-alnum (if (muse-extreg-usable-p) "[:alnum:]" @@ -152,7 +138,7 @@ the time." :group 'muse-regexp) (defcustom muse-tag-regexp - (concat "<\\([^/" muse-regexp-space "][^" muse-regexp-space + (concat "<\\([^/\n" muse-regexp-blank "][^\n" muse-regexp-blank "]*\\)\\(\\s-+[^<>]+[^]\\)?\\(/\\)?>") "A regexp used to find XML-style tags within a buffer when publishing. Group 1 should be the tag name, group 2 the properties, and group @@ -168,7 +154,7 @@ Paren group 1 must match the URL, and paren group 2 the description." :group 'muse-regexp) (defcustom muse-implicit-link-regexp - (concat "\\([^" muse-regexp-space "]+\\)") + (concat "\\([^" muse-regexp-blank "\n]+\\)") "Regexp used to match an implicit link. An implicit link is the largest block of text to be checked for URLs and bare WikiNames by the `muse-link-at-point' function. diff --git a/lisp/muse-texinfo.el b/lisp/muse-texinfo.el index 3d9577b..dda08cc 100644 --- a/lisp/muse-texinfo.el +++ b/lisp/muse-texinfo.el @@ -187,7 +187,7 @@ differs little between the various styles." (defun muse-texinfo-insert-anchor (anchor) "Insert an anchor, either before the next word, or within a tag." (unless (get-text-property (match-end 1) 'noemphasis) - (skip-chars-forward muse-regexp-space) + (skip-chars-forward (concat muse-regexp-blank "\n")) (when (looking-at "<\\([^ />]+\\)>") (goto-char (match-end 0))) (insert "@anchor{" anchor "}"))) diff --git a/lisp/muse-xml.el b/lisp/muse-xml.el index cb90130..8e7d6f1 100644 --- a/lisp/muse-xml.el +++ b/lisp/muse-xml.el @@ -267,7 +267,7 @@ match is found, `muse-xml-charset-default' is used instead." (defun muse-xml-insert-anchor (anchor) "Insert an anchor, either around the word at point, or within a tag." (unless (get-text-property (match-end 1) 'noemphasis) - (skip-chars-forward muse-regexp-space) + (skip-chars-forward (concat muse-regexp-blank "\n")) (when (looking-at "<\\([^ />]+\\)>") (goto-char (match-end 0))) (insert "\n"))) diff --git a/lisp/muse.el b/lisp/muse.el index 8e7a63f..3da552b 100644 --- a/lisp/muse.el +++ b/lisp/muse.el @@ -193,7 +193,7 @@ All this means is that certain extensions, like .gz, are removed." :warning)) (message "%s: Error evaluating %s: %s" (muse-page-name) form err)) - "")))) + "; INVALID LISP CODE")))) (defmacro muse-with-temp-buffer (&rest body) "Create a temporary buffer, and evaluate BODY there like `progn'. -- 2.11.4.GIT