+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
+ (gnus-string-equal
(nth 1 (mail-extract-address-components from))
(nth 1 (mail-extract-address-components reply-to)))))
(gnus-article-hide-header "reply-to"))))
(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