Fix toggle-header arg bug.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 3 Nov 1999 21:18:15 +0000 (21:18 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 3 Nov 1999 21:18:15 +0000 (21:18 +0000)
lisp/ChangeLog
lisp/gnus-sum.el

index 04092d0..f1dc561 100644 (file)
@@ -1,3 +1,7 @@
+1999-11-03 16:08:56  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-sum.el (gnus-summary-toggle-header): Fix arg bug.
+
 1999-11-03 15:27:38  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
        * mailcap.el (mailcap-viewer-lessp): Fix bug.
index 8ff730c..ac5d927 100644 (file)
@@ -7152,9 +7152,12 @@ If ARG is a negative number, hide the unwanted header lines."
       (let* ((buffer-read-only nil)
             (inhibit-point-motion-hooks t)
             hidden e)
-       (save-restriction 
-         (article-narrow-to-head)
-         (setq hidden (gnus-article-hidden-text-p 'headers)))
+       (setq hidden
+             (if (numberp arg)
+                 (>= arg 0)
+               (save-restriction 
+                 (article-narrow-to-head)
+                 (gnus-article-hidden-text-p 'headers))))
        (goto-char (point-min))
        (when (search-forward "\n\n" nil t)
          (delete-region (point-min) (1- (point))))
@@ -7167,8 +7170,7 @@ If ARG is a negative number, hide the unwanted header lines."
        (save-restriction
          (narrow-to-region (point-min) (point))
          (article-decode-encoded-words)
-         (if (or hidden
-                 (and (numberp arg) (< arg 0)))
+         (if  hidden
              (let ((gnus-treat-hide-headers nil)
                    (gnus-treat-hide-boring-headers nil))
                (gnus-treat-article 'head))