Synch with Oort Gnus.
authoryamaoka <yamaoka>
Tue, 30 Jan 2001 22:20:14 +0000 (22:20 +0000)
committeryamaoka <yamaoka>
Tue, 30 Jan 2001 22:20:14 +0000 (22:20 +0000)
lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-util.el
lisp/gnus.el

index 5a518c8..012dd64 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 145d268..fa5c36f 100644 (file)
@@ -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")))
index a1e42d6..c9b2d58 100644 (file)
@@ -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
index 28f7926..23c869b 100644 (file)
@@ -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)