+2001-01-30 10:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-util.el (gnus-string-equal): New function.
+
+ * gnus-art.el (article-hide-boring-headers): Use it.
+
2001-01-27 Karl Kleinpaste <karl@charcoal.com>
* gnus-art.el (gnus-article-banner-alist): eGroups new banner.
'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"))
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"))
(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")))
(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
: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)