diff options
author | Eli Zaretskii <eliz@is.elta.co.il> | 2003-12-30 10:46:37 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@is.elta.co.il> | 2003-12-30 10:46:37 +0000 |
commit | fa8f290e464cba96844a2756c94f072d599a79f7 (patch) | |
tree | a73b591bc8d302172ba0f264042dd01b7023b9b1 /lisp/mail/rmail.el | |
parent | d9e0b412fc4a60736407b53dc054d0a95f275023 (diff) | |
download | emacs-fa8f290e464cba96844a2756c94f072d599a79f7.tar.gz |
(rmail-convert-to-babyl-format): Make the code
cleaner (suggested by Richard M. Stallman).
Diffstat (limited to 'lisp/mail/rmail.el')
-rw-r--r-- | lisp/mail/rmail.el | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index acc7e4839dd..512712ec4bc 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -1687,19 +1687,22 @@ It returns t if it got any new messages." (delete-region (point) (search-backward ":")) (insert ": 8bit"))) (if base64-header-field-end - (condition-case nil - (save-excursion - (base64-decode-region (1+ header-end) - (- (point) 2)) - ;; Change "base64" to "8bit", to reflect the - ;; decoding we just did. - (goto-char (1+ header-end)) - (while (search-forward "\r\n" (point-max) t) - (replace-match "\n")) - (goto-char base64-header-field-end) - (delete-region (point) (search-backward ":")) - (insert ": 8bit")) - (error nil))) + (save-excursion + (when + (condition-case nil + (progn + (base64-decode-region (1+ header-end) + (- (point) 2)) + t) + (error nil)) + ;; Change "base64" to "8bit", to reflect the + ;; decoding we just did. + (goto-char (1+ header-end)) + (while (search-forward "\r\n" (point-max) t) + (replace-match "\n")) + (goto-char base64-header-field-end) + (delete-region (point) (search-backward ":")) + (insert ": 8bit")))) (setq last-coding-system-used nil) (or rmail-enable-mime (not rmail-enable-multibyte) @@ -1829,15 +1832,18 @@ It returns t if it got any new messages." (delete-region (point) (search-backward ":")) (insert ": 8bit"))) (if base64-header-field-end - (condition-case nil - (save-excursion - (base64-decode-region header-end (point)) - ;; Change "base64" to "8bit", to reflect the - ;; decoding we just did. - (goto-char base64-header-field-end) - (delete-region (point) (search-backward ":")) - (insert ": 8bit")) - (error nil)))) + (save-excursion + (when + (condition-case nil + (progn + (base64-decode-region header-end (point)) + t) + (error nil)) + ;; Change "base64" to "8bit", to reflect the + ;; decoding we just did. + (goto-char base64-header-field-end) + (delete-region (point) (search-backward ":")) + (insert ": 8bit"))))) (save-excursion (save-restriction |