From 4825333d08e7d46d3cdf9eec39443e62fab6d685 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Sun, 19 Jun 2005 03:05:38 +0000 Subject: [PATCH] Cater even more to XEmacs and its annoying whims. * examples/Makefile (%.html, %.pdf, %.info): Pass EMACS value as environment variable. * lisp/Makefile (%.elc, test): Don't use "-L" option since XEmacs can't handle it. Load `muse-build.el' instead. * lisp/muse-colors.el (muse-colors-link): Add note that `link' is not used. * lisp/muse-journal.el (muse-journal-latex-munge-buffer) (muse-journal-rss-munge-buffer): Add note that the `qotd' binding is not used. * lisp/muse-journal.el (muse-journal-generate-pages): Add note that this function does not appear to be used. * lisp/muse.el (muse-replace-regexp-in-string): Use in place of `replace-regexp-in-string', since XEmacs doesn't have this function. We only implement the first 3 args, but this could be extended if we need to do so. * lisp/muse-blosxom.el (muse-blosxom-title-to-file): Use `muse-replace-regexp-in-string' in place of `replace-regexp-in-string' * lisp/muse-journal.el (muse-journal-anchorize-title): Ditto. * lisp/muse-colors.el (muse-colors-custom-tags): Remove unused binding to make XEmacs shut up. * lisp/muse-convert.el (muse-write-footnote): Ditto. * lisp/muse-html.el (muse-html-markup-table): Ditto. * lisp/muse-http.el (muse-winnow-list): Ditto. * lisp/muse-poem.el (muse-poem-markup-tag): Ditto. * lisp/muse-project.el (muse-project-file-entries): Ditto. * lisp/muse-publish.el (muse-publish-markup): Ditto. * scripts/muse-build.el: Add contrib path first; probably doesn't change anything. * scripts/publish: Use EMACS environment variable instead of hard-coding it. git-archimport-id: mwolson@gnu.org--2005/muse--main--1.0--patch-66 --- ChangeLog | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ examples/Makefile | 6 ++--- lisp/Makefile | 8 ++----- lisp/muse-blosxom.el | 4 ++-- lisp/muse-colors.el | 5 +++-- lisp/muse-convert.el | 3 +-- lisp/muse-html.el | 3 +-- lisp/muse-http.el | 3 +-- lisp/muse-journal.el | 6 +++-- lisp/muse-latex.el | 4 +--- lisp/muse-poem.el | 2 +- lisp/muse-project.el | 3 +-- lisp/muse-publish.el | 2 +- lisp/muse.el | 13 +++++++++++ scripts/muse-build.el | 2 +- scripts/publish | 4 ++-- 16 files changed, 99 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ff6744..eb67979 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,68 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2005/muse--main--1.0 # +2005-06-19 03:05:38 GMT Michael Olson patch-66 + + Summary: + Cater even more to XEmacs and its annoying whims. + Revision: + muse--main--1.0--patch-66 + + * examples/Makefile (%.html, %.pdf, %.info): Pass EMACS value as + environment variable. + + * lisp/Makefile (%.elc, test): Don't use "-L" option since XEmacs can't + handle it. Load `muse-build.el' instead. + + * lisp/muse-colors.el (muse-colors-link): Add note that `link' is not + used. + + * lisp/muse-journal.el (muse-journal-latex-munge-buffer) + (muse-journal-rss-munge-buffer): Add note that the `qotd' binding is + not used. + + * lisp/muse-journal.el (muse-journal-generate-pages): Add note that this + function does not appear to be used. + + * lisp/muse.el (muse-replace-regexp-in-string): Use in place of + `replace-regexp-in-string', since XEmacs doesn't have this function. + We only implement the first 3 args, but this could be extended if we + need to do so. + + * lisp/muse-blosxom.el (muse-blosxom-title-to-file): Use + `muse-replace-regexp-in-string' in place of `replace-regexp-in-string' + + * lisp/muse-journal.el (muse-journal-anchorize-title): Ditto. + + * lisp/muse-colors.el (muse-colors-custom-tags): Remove unused binding to + make XEmacs shut up. + + * lisp/muse-convert.el (muse-write-footnote): Ditto. + + * lisp/muse-html.el (muse-html-markup-table): Ditto. + + * lisp/muse-http.el (muse-winnow-list): Ditto. + + * lisp/muse-poem.el (muse-poem-markup-tag): Ditto. + + * lisp/muse-project.el (muse-project-file-entries): Ditto. + + * lisp/muse-publish.el (muse-publish-markup): Ditto. + + * scripts/muse-build.el: Add contrib path first; probably doesn't change + anything. + + * scripts/publish: Use EMACS environment variable instead of hard-coding + it. + + modified files: + ChangeLog examples/Makefile lisp/Makefile lisp/muse-blosxom.el + lisp/muse-colors.el lisp/muse-convert.el lisp/muse-html.el + lisp/muse-http.el lisp/muse-journal.el lisp/muse-latex.el + lisp/muse-poem.el lisp/muse-project.el lisp/muse-publish.el + lisp/muse.el scripts/muse-build.el scripts/publish + + 2005-06-19 00:43:54 GMT Michael Olson patch-65 Summary: diff --git a/examples/Makefile b/examples/Makefile index a326c63..1d5996b 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -10,13 +10,13 @@ all: examples examples: $(EXAMPLES) %.html: % - SITEFLAG=$(SITEFLAG) ../scripts/publish html $< + EMACS=$(EMACS) SITEFLAG=$(SITEFLAG) ../scripts/publish html $< %.pdf: % - SITEFLAG=$(SITEFLAG) ../scripts/publish pdf $< + EMACS=$(EMACS) SITEFLAG=$(SITEFLAG) ../scripts/publish pdf $< %.info: % - SITEFLAG=$(SITEFLAG) ../scripts/publish info $< + EMACS=$(EMACS) SITEFLAG=$(SITEFLAG) ../scripts/publish info $< clean: -rm -f missfont.log diff --git a/lisp/Makefile b/lisp/Makefile index a26bd49..bafd5c5 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -13,16 +13,12 @@ muse-build.elc: ../scripts/muse-build.el @echo muse-build.el is not byte-compiled %.elc: %.el - @$(EMACS) -q $(SITEFLAG) -batch \ - -L ../contrib -L . \ - -l ../scripts/muse-build.el\ + @$(EMACS) -q $(SITEFLAG) -batch -l ../scripts/muse-build.el \ -f batch-byte-compile $< clean realclean distclean fullclean: -rm -f *.elc *~ test: $(ELC) - $(EMACS) -q $(SITEFLAG) -batch \ - -L ../contrib -L . \ - -l ../scripts/muse-build.el \ + $(EMACS) -q $(SITEFLAG) -batch -l ../scripts/muse-build.el \ -f muse-elint-files muse-*.el diff --git a/lisp/muse-blosxom.el b/lisp/muse-blosxom.el index 95629d1..f744756 100644 --- a/lisp/muse-blosxom.el +++ b/lisp/muse-blosxom.el @@ -164,8 +164,8 @@ Directories starting with \".\" will be ignored." Feel free to overwrite this if you have a different concept of what should be allowed in a filename." - (replace-regexp-in-string (concat "[^-." muse-regexp-alnum "]") - "_" (downcase title))) + (muse-replace-regexp-in-string (concat "[^-." muse-regexp-alnum "]") + "_" (downcase title))) (defun muse-blosxom-new-entry (category title) "Start a new blog entry with given CATEGORY. diff --git a/lisp/muse-colors.el b/lisp/muse-colors.el index 9033ac6..b08b334 100644 --- a/lisp/muse-colors.el +++ b/lisp/muse-colors.el @@ -429,7 +429,7 @@ Functions should not modify the contents of the buffer." (when tag-info (let ((closed-tag (match-string 3)) (start (match-beginning 0)) - (beg (point)) end attrs) + end attrs) (when (nth 2 tag-info) (let ((attrstr (match-string 2))) (while (and attrstr @@ -536,7 +536,8 @@ bad-link face" (while (> (match-end 0) cur) (flyspell-unhighlight-at cur) (setq cur (1+ cur))))) - (let* ((link (muse-match-string-no-properties 2)) + (let* (;; FIXME: link is not used + (link (muse-match-string-no-properties 2)) (desc (muse-match-string-no-properties 3)) (props (muse-link-properties desc (muse-link-face (match-string 2)))) diff --git a/lisp/muse-convert.el b/lisp/muse-convert.el index e7227ce..b15841a 100644 --- a/lisp/muse-convert.el +++ b/lisp/muse-convert.el @@ -55,8 +55,7 @@ (goto-char (point-max)) (if (= note 1) (insert "\nFootnotes:\n\n")) - (let ((beg (point))) - (insert "\n[" (number-to-string note) "] " text ?\n)))) + (insert "\n[" (number-to-string note) "] " text ?\n))) ;;;###autoload (defun muse-latex-transform () diff --git a/lisp/muse-html.el b/lisp/muse-html.el index f31c5cb..466a559 100644 --- a/lisp/muse-html.el +++ b/lisp/muse-html.el @@ -485,8 +485,7 @@ if not escaped." ((= type 3) "tfoot"))) (col (cond ((= type 1) "td") ((= type 2) "th") - ((= type 3) "td"))) - field) + ((= type 3) "td")))) (insert "\n" " <" part ">\n" " \n") diff --git a/lisp/muse-http.el b/lisp/muse-http.el index ab9f801..a22f977 100644 --- a/lisp/muse-http.el +++ b/lisp/muse-http.el @@ -72,8 +72,7 @@ customization group." (defun muse-winnow-list (entries &optional predicate) "Return only those ENTRIES for which PREDICATE returns non-nil." - (let ((flist (list t)) - valid p) + (let ((flist (list t))) (let ((entry entries)) (while entry (if (funcall predicate (car entry)) diff --git a/lisp/muse-journal.el b/lisp/muse-journal.el index e5e1169..88d3bda 100644 --- a/lisp/muse-journal.el +++ b/lisp/muse-journal.el @@ -155,6 +155,7 @@ and group 3 is the optional heading for the entry." function)) :group 'muse-journal) +;; FIXME: This doesn't appear to be used. (defun muse-journal-generate-pages () (let ((output-dir (muse-style-element :path))) (goto-char (point-min)) @@ -323,8 +324,7 @@ For more on the structure of this list, see (setq title (substring title 0 (match-beginning 0)))) (if (string-match "<[^>]+>" title) (setq title (replace-match "" nil nil title))) - (downcase (replace-regexp-in-string "[^a-zA-Z0-9_]" "" - title)))) + (downcase (muse-replace-regexp-in-string "[^a-zA-Z0-9_]" "" title)))) (defun muse-journal-sort-entries (&optional direction) (interactive "P") @@ -453,6 +453,7 @@ For more on the structure of this list, see (while (re-search-forward heading-regexp nil t) (let ((date (match-string 1)) (title (match-string 2)) + ;; FIXME: Nothing is done with qotd qotd section) (save-match-data (when (and date @@ -503,6 +504,7 @@ For more on the structure of this list, see (let* ((date (match-string 1)) (orig-date date) (title (match-string 2)) + ;; FIXME: Nothing is done with qotd enclosure qotd desc) (if title (save-match-data diff --git a/lisp/muse-latex.el b/lisp/muse-latex.el index d4e98c6..1a880ec 100644 --- a/lisp/muse-latex.el +++ b/lisp/muse-latex.el @@ -273,9 +273,7 @@ system to an associated CJK coding system." (lambda (file output-path) (let ((command (format "cd %s; pdflatex %s" (file-name-directory output-path) file))) - (and (= 0 (shell-command command)) - (= 0 (shell-command command)) - (= 0 (shell-command command)))))) + (shell-command command)))) ".aux" ".toc" ".out" ".log")) (unless (assoc "latex" muse-publishing-styles) diff --git a/lisp/muse-poem.el b/lisp/muse-poem.el index d2fd312..876d78b 100644 --- a/lisp/muse-poem.el +++ b/lisp/muse-poem.el @@ -191,7 +191,7 @@ The form of usage is: " (let ((page (cdr (assoc (cdr (assoc "title" attrs)) (muse-project-file-alist)))) - beg start end text) + beg end) (if (null page) (insert " *Reference to\n unknown poem \"" (cdr (assoc "title" attrs)) "\".*\n") diff --git a/lisp/muse-project.el b/lisp/muse-project.el index 0457908..ebb4d63 100644 --- a/lisp/muse-project.el +++ b/lisp/muse-project.el @@ -102,8 +102,7 @@ when publishing files in that project." (defun muse-project-file-entries (path) (let* ((names (list t)) - (lnames names) - file) + (lnames names)) (cond ((file-directory-p path) (dolist (file (directory-files path t)) diff --git a/lisp/muse-publish.el b/lisp/muse-publish.el index b726fac..0f33d6a 100644 --- a/lisp/muse-publish.el +++ b/lisp/muse-publish.el @@ -372,7 +372,7 @@ contents were requested.") (let ((regexp (nth 1 (car rules))) (group (nth 2 (car rules))) (repl (nth 3 (car rules))) - start last-pos pos) + last-pos pos) (if (symbolp regexp) (setq regexp (symbol-value regexp))) (if (and verbose (not muse-batch-publishing-p)) diff --git a/lisp/muse.el b/lisp/muse.el index 08f496f..9c3e55a 100644 --- a/lisp/muse.el +++ b/lisp/muse.el @@ -176,6 +176,19 @@ omitted, a default message listing FORM itself is used." (match-string-no-properties num string) (match-string num string))) +(defun muse-replace-regexp-in-string (regexp replacement text &rest args) + "Replace REGEXP with REPLACEMENT in TEXT. +Other ARGS are ignored." + ;; If we really need any more args, that could be hacked in later. + (cond + ((fboundp 'replace-regexp-in-string) + (replace-regexp-in-string regexp replacement text)) + ((fboundp 'replace-in-string) + (replace-in-string text regexp replacement)) + (t (while (string-match regexp text) + (setq text (replace-match replacement nil t text))) + text))) + (provide 'muse) ;;; muse.el ends here diff --git a/scripts/muse-build.el b/scripts/muse-build.el index 46f450d..e2ea69a 100644 --- a/scripts/muse-build.el +++ b/scripts/muse-build.el @@ -1,5 +1,5 @@ -(add-to-list 'load-path "../lisp") (add-to-list 'load-path "../contrib") +(add-to-list 'load-path "../lisp") (defun muse-elint-files () (require 'elint) diff --git a/scripts/publish b/scripts/publish index 106da1e..17b9592 100755 --- a/scripts/publish +++ b/scripts/publish @@ -1,7 +1,7 @@ #!/bin/bash style=$(echo $1 | sed 's/^--//') shift -emacs -q -batch $SITEFLAG -L ../lisp \ - -l muse.el -l muse-regexps.el -l muse-publish.el \ +$EMACS -q $SITEFLAG -batch -l ../scripts/muse-build.el \ + -l muse-regexps.el -l muse.el -l muse-publish.el \ -l muse-html.el -l muse-latex.el -l muse-texinfo.el \ -f muse-batch-publish-files $style --output-dir=. "$@" -- 2.11.4.GIT