2001-01-30 10:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 30 Jan 2001 16:13:37 +0000 (16:13 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 30 Jan 2001 16:13:37 +0000 (16:13 +0000)
* gnus-util.el (gnus-string-equal): New function.

* gnus-art.el (article-hide-boring-headers): Use it.

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-util.el

index 41fb35e..c89e2f9 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 1443c8e..aae22d0 100644 (file)
@@ -1310,11 +1310,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"))
@@ -1324,14 +1325,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"))
@@ -1339,7 +1341,7 @@ always hide."
                (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"))))
index 9aaea46..39ecfd0 100644 (file)
@@ -1014,6 +1014,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