From: yamaoka Date: Tue, 30 Jan 2001 22:20:14 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_0-05-quimby-last-~22 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=5ac3dbafea073b85d7df43a0f11d4f4ba76411c2;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5a518c8..012dd64 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2001-01-30 10:00:00 ShengHuo ZHU + + * gnus-util.el (gnus-string-equal): New function. + + * gnus-art.el (article-hide-boring-headers): Use it. + 2001-01-27 Karl Kleinpaste * gnus-art.el (gnus-article-banner-alist): eGroups new banner. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 145d268..fa5c36f 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1383,11 +1383,12 @@ always hide." 'boring-headers))) ;; Hide boring Newsgroups header. ((eq elem 'newsgroups) - (when (equal (gnus-fetch-field "newsgroups") - (gnus-group-real-name - (if (boundp 'gnus-newsgroup-name) - gnus-newsgroup-name - ""))) + (when (gnus-string-equal + (gnus-fetch-field "newsgroups") + (gnus-group-real-name + (if (boundp 'gnus-newsgroup-name) + gnus-newsgroup-name + ""))) (gnus-article-hide-header "newsgroups"))) ((eq elem 'to-address) (let ((to (message-fetch-field "to")) @@ -1397,14 +1398,15 @@ always hide." gnus-newsgroup-name "") 'to-address))) (when (and to to-address (ignore-errors - (equal + (gnus-string-equal ;; only one address in To (nth 1 (mail-extract-address-components to)) to-address))) (gnus-article-hide-header "to")))) ((eq elem 'followup-to) - (when (equal (message-fetch-field "followup-to") - (message-fetch-field "newsgroups")) + (when (gnus-string-equal + (message-fetch-field "followup-to") + (message-fetch-field "newsgroups")) (gnus-article-hide-header "followup-to"))) ((eq elem 'reply-to) (let ((from (message-fetch-field "from")) @@ -1412,9 +1414,9 @@ always hide." (when (and from reply-to (ignore-errors - (equal - (nth 1 (funcall gnus-extract-address-components from)) - (nth 1 (funcall gnus-extract-address-components reply-to))))) + (gnus-string-equal + (nth 1 (mail-extract-address-components from)) + (nth 1 (mail-extract-address-components reply-to))))) (gnus-article-hide-header "reply-to")))) ((eq elem 'date) (let ((date (message-fetch-field "date"))) diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index a1e42d6..c9b2d58 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -1064,6 +1064,12 @@ Entries without port tokens default to DEFAULTPORT." (remove-text-properties start end properties object)) t)) +(defun gnus-string-equal (x y) + "Like `string-equal', except it compares case-insensitively." + (and (= (length x) (length y)) + (or (string-equal x y) + (string-equal (downcase x) (downcase y))))) + (provide 'gnus-util) ;;; gnus-util.el ends here diff --git a/lisp/gnus.el b/lisp/gnus.el index 28f7926..23c869b 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1365,11 +1365,11 @@ commands will still require prompting." :type 'boolean) (defcustom gnus-extract-address-components 'gnus-extract-address-components - "*Function for extracting address components from a From header. -Two pre-defined function exist: `gnus-extract-address-components', -which is the default, quite fast, and too simplistic solution, and + "Function for extracting address components from a From header. +Three pre-defined functions exist: `gnus-extract-address-components', +which is the default, quite fast, and too simplistic solution, `mail-extract-address-components', which works much better, but is -slower." +slower, and `std11-extract-address-components'." :group 'gnus-summary-format :type '(radio (function-item gnus-extract-address-components) (function-item mail-extract-address-components)