From bdbeb193c44846f93d3cb94ef9272eda995535a1 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 7 Jul 2000 14:14:08 +0000 Subject: [PATCH] (rmail-clear-headers): Don't throw an error if rmail-ignored-headers is nil. (rmail-retry-failure): Bind rmail-ignored-headers and rmail-displayed-headers to nil. --- lisp/mail/rmail.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 64060f5144f..e3040e6a283 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -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)) -- 2.39.2