From: tsuchiya Date: Wed, 4 Sep 2002 06:57:04 +0000 (+0000) Subject: (gnus-namazu/highlight-words): Stricten regular expression to highlight keywords. X-Git-Tag: t-gnus-6_15_8-01-quimby~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ca05ee079d3567f29428d3dc4b3f128772baa6f5;p=elisp%2Fgnus.git- (gnus-namazu/highlight-words): Stricten regular expression to highlight keywords. --- diff --git a/ChangeLog b/ChangeLog index 2290a24..9b9c383 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-09-04 TSUCHIYA Masatoshi + + * lisp/gnus-namazu.el (gnus-namazu/highlight-words): Stricten + regular expression to highlight keywords. + 2002-08-28 Katsumi Yamaoka * lisp/lpath.el: Fbind `smtpmail-send-it' for Mule 2. diff --git a/lisp/gnus-namazu.el b/lisp/gnus-namazu.el index 4940d6c..5ef95eb 100644 --- a/lisp/gnus-namazu.el +++ b/lisp/gnus-namazu.el @@ -616,8 +616,18 @@ generate possible group names from it." (while (re-search-forward "[^  \t\r\f\n]+" nil t) (push (match-string 0) query)) (when query - (list (list (regexp-opt query) - 0 0 'gnus-namazu-query-highlight-face))))) + (let (en ja) + (dolist (q query) + (if (string-match "\\cj" q) + (push q ja) + (push q en))) + (append + (when en + (list (list (concat "\\b\\(" (regexp-opt en) "\\)\\b") + 0 0 'gnus-namazu-query-highlight-face))) + (when ja + (list (list (regexp-opt ja) + 0 0 'gnus-namazu-query-highlight-face)))))))) (defun gnus-namazu/truncate-article-list (articles) (let ((hit (length articles)))