X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fmm-encode.el;h=587abf89a60dbb467b88baf24bef411744ca261e;hb=30d9f23f0291edcefeca1958befadb992d2982b5;hp=30bc8cd5584acbcc57fb3efbb0b00aef6ff3c965;hpb=58450d89a9bb6a0bcd1c278b29433d1a5f86f763;p=elisp%2Fgnus.git- diff --git a/lisp/mm-encode.el b/lisp/mm-encode.el index 30bc8cd..587abf8 100644 --- a/lisp/mm-encode.el +++ b/lisp/mm-encode.el @@ -1,5 +1,5 @@ ;;; mm-encode.el --- Functions for encoding MIME things -;; Copyright (C) 1998 Free Software Foundation, Inc. +;; Copyright (C) 1998,99 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; MORIOKA Tomohiko @@ -29,6 +29,9 @@ (defvar mm-content-transfer-encoding-defaults '(("text/.*" quoted-printable) + ("message/rfc822" 8bit) + ("application/emacs-lisp" 8bit) + ("application/x-patch" 8bit) (".*" base64)) "Alist of regexps that match MIME types and their encodings.") @@ -63,21 +66,17 @@ (goto-char (point-min)) (while (search-forward "\n" nil t) (replace-match "\r\n" t t))) - (condition-case () + (condition-case error (base64-encode-region (point-min) (point-max)) - (error nil))) + (error + (message "Error while decoding: %s" error) + nil))) ((memq encoding '(7bit 8bit binary)) ) ((null encoding) ) - ;;((eq encoding 'x-uuencode) - ;; (condition-case () - ;; (uudecode-encode-region (point-min) (point-max)) - ;; (error nil))) ((functionp encoding) - (condition-case () - (funcall encoding (point-min) (point-max)) - (error nil))) + (ignore-errors (funcall encoding (point-min) (point-max)))) (t (message "Unknown encoding %s; defaulting to 8bit" encoding))))