From ca05ee079d3567f29428d3dc4b3f128772baa6f5 Mon Sep 17 00:00:00 2001 From: tsuchiya Date: Wed, 4 Sep 2002 06:57:04 +0000 Subject: [PATCH] (gnus-namazu/highlight-words): Stricten regular expression to highlight keywords. --- ChangeLog | 5 +++++ lisp/gnus-namazu.el | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) 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))) -- 1.7.10.4