From 11c6c306097a70e16c42aaa912a0ec85d84050c3 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Mon, 28 Aug 2006 01:31:40 +0000 Subject: [PATCH] Fix bug introduced in last patch. 2006-08-27 Michael Olson * lisp/muse-colors.el (muse-configure-highlighting): Prune out any nil values before they get to mapconcat. This fixes a lockup when muse-wiki-match-all-project-files is nil. git-archimport-id: mwolson@gnu.org--2006/muse--main--1.0--patch-199 --- ChangeLog | 4 ++++ lisp/muse-colors.el | 19 ++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index d1ad661..2a37bae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-08-27 Michael Olson + * lisp/muse-colors.el (muse-configure-highlighting): Prune out any + nil values before they get to mapconcat. This fixes a lockup when + muse-wiki-match-all-project-files is nil. + * lisp/muse-wiki.el (muse-wiki-match-all-project-files) (muse-wiki-ignore-implicit-links-to-current-page) (muse-wiki-interwiki-regexp, muse-wiki-interwiki-alist) diff --git a/lisp/muse-colors.el b/lisp/muse-colors.el index ceeaa08..df45362 100644 --- a/lisp/muse-colors.el +++ b/lisp/muse-colors.el @@ -232,13 +232,18 @@ whether progress messages should be displayed to the user." (defvar muse-colors-vector nil) (defun muse-configure-highlighting (sym val) - (setq muse-colors-regexp - (concat "\\(" (mapconcat (function - (lambda (rule) - (if (symbolp (car rule)) - (symbol-value (car rule)) - (car rule)))) val "\\|") "\\)") - muse-colors-vector (make-vector 128 nil)) + (let ((regexps nil)) + (dolist (rule val) + (let ((val (cond ((symbolp (car rule)) + (symbol-value (car rule))) + ((stringp (car rule)) + (car rule)) + (t nil)))) + (when val (setq regexps (cons val regexps))))) + (setq muse-colors-regexp (concat "\\(" + (mapconcat #'identity regexps "\\|") + "\\)") + muse-colors-vector (make-vector 128 nil))) (let ((rules val)) (while rules (if (eq (cadr (car rules)) t) -- 2.11.4.GIT