From: Gerd Moellmann Date: Fri, 7 Jul 2000 14:14:08 +0000 (+0000) Subject: (rmail-clear-headers): Don't throw an error X-Git-Tag: emacs-pretest-21.0.90~2915 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bdbeb193c44846f93d3cb94ef9272eda995535a1;p=emacs.git (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. --- 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))