Synch to No Gnus 200406040702.
authoryamaoka <yamaoka>
Fri, 4 Jun 2004 07:04:03 +0000 (07:04 +0000)
committeryamaoka <yamaoka>
Fri, 4 Jun 2004 07:04:03 +0000 (07:04 +0000)
lisp/ChangeLog
lisp/gnus-art.el

index 56bbf6e..9278ce8 100644 (file)
@@ -1,3 +1,9 @@
+2004-06-04  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (article-hide-headers): Refer to the values for
+       gnus-ignored-headers and gnus-visible-headers in the summary
+       buffer since a user may have set them as group parameters.
+
 2004-06-03  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * assistant.el (assistant-node-name): new convenience function
index ce20171..19624e7 100644 (file)
@@ -1697,25 +1697,34 @@ Initialized from `text-mode-syntax-table.")
        (when (eq 1 (point-min))
          (set-window-start (get-buffer-window (current-buffer)) 1)))
     (unless gnus-inhibit-hiding
-      (save-excursion
-       (save-restriction
-         (let ((inhibit-read-only t)
-               (case-fold-search t)
-               (max (1+ (length gnus-sorted-header-list)))
-               (ignored (when (not gnus-visible-headers)
-                          (cond ((stringp gnus-ignored-headers)
-                                 gnus-ignored-headers)
-                                ((listp gnus-ignored-headers)
-                                 (mapconcat 'identity gnus-ignored-headers
-                                            "\\|")))))
-               (visible
-                (cond ((stringp gnus-visible-headers)
-                       gnus-visible-headers)
-                      ((and gnus-visible-headers
-                            (listp gnus-visible-headers))
-                       (mapconcat 'identity gnus-visible-headers "\\|"))))
-               (inhibit-point-motion-hooks t)
-               beg)
+      (let ((inhibit-read-only t)
+           (case-fold-search t)
+           (max (1+ (length gnus-sorted-header-list)))
+           (inhibit-point-motion-hooks t)
+           ignored visible beg)
+       (save-excursion
+         ;; `gnus-ignored-headers' and `gnus-visible-headers' may be
+         ;; group parameters, so we should go to the summary buffer.
+         (when (prog1
+                   (condition-case nil
+                       (progn (set-buffer gnus-summary-buffer) t)
+                     (error nil))
+                 (setq ignored (when (not gnus-visible-headers)
+                                 (cond ((stringp gnus-ignored-headers)
+                                        gnus-ignored-headers)
+                                       ((listp gnus-ignored-headers)
+                                        (mapconcat 'identity
+                                                   gnus-ignored-headers
+                                                   "\\|"))))
+                       visible (cond ((stringp gnus-visible-headers)
+                                      gnus-visible-headers)
+                                     ((and gnus-visible-headers
+                                           (listp gnus-visible-headers))
+                                      (mapconcat 'identity
+                                                 gnus-visible-headers
+                                                 "\\|")))))
+           (set-buffer gnus-article-buffer))
+         (save-restriction
            ;; First we narrow to just the headers.
            (article-narrow-to-head)
            ;; Hide any "From " lines at the beginning of (mail) articles.