]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-clear-headers): Don't throw an error
authorGerd Moellmann <gerd@gnu.org>
Fri, 7 Jul 2000 14:14:08 +0000 (14:14 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 7 Jul 2000 14:14:08 +0000 (14:14 +0000)
if rmail-ignored-headers is nil.
(rmail-retry-failure): Bind rmail-ignored-headers and
rmail-displayed-headers to nil.

lisp/mail/rmail.el

index 64060f5144f7dd1bbac268c601304b29400a7f22..e3040e6a283a1a1f19a072239a0b97538e6d330d 100644 (file)
@@ -1834,9 +1834,10 @@ Otherwise, delete all header fields whose names match `rmail-ignored-headers'."
        (or ignored-headers (setq ignored-headers rmail-ignored-headers))
        (save-restriction
          (narrow-to-region (point-min) (point))
-         (while (progn
-                  (goto-char (point-min))
-                  (re-search-forward ignored-headers nil t))
+         (while (and ignored-headers
+                     (progn
+                       (goto-char (point-min))
+                       (re-search-forward ignored-headers nil t)))
            (beginning-of-line)
            (delete-region (point)
                           (if (re-search-forward "\n[^ \t]" nil t)
@@ -3193,7 +3194,9 @@ specifying headers which should not be copied into the new message."
          ;; Insert original text as initial text of new draft message.
          ;; Bind inhibit-read-only since the header delimiter
          ;; of the previous message was probably read-only.
-         (let ((inhibit-read-only t))
+         (let ((inhibit-read-only t)
+               rmail-displayed-headers
+               rmail-ignored-headers)
            (erase-buffer)
            (insert-buffer-substring rmail-this-buffer bounce-start bounce-end)
            (goto-char (point-min))