+ (quoted-printable-internal-decode-region start end)))
+
+(defun quoted-printable-decode-string (string)
+ "Decode STRING which is encoded in quoted-printable, and return the result."
+ (with-temp-buffer
+ (insert string)
+ (quoted-printable-decode-region (point-min)(point-max))
+ (buffer-string)))
+
+
+(mel-define-method-function
+ (mime-decode-string string (nil "quoted-printable"))
+ 'quoted-printable-decode-string)
+
+(mel-define-method-function
+ (mime-decode-region start end (nil "quoted-printable"))
+ 'quoted-printable-decode-region)
+
+
+(defvar quoted-printable-external-decoder-option-to-specify-file '("-o")
+ "*list of options of quoted-printable decoder program to specify file.")
+
+(mel-define-method mime-write-decoded-region (start end filename
+ (nil "quoted-printable"))
+ "Decode and write current region encoded by quoted-printable into FILENAME.
+START and END are buffer positions."
+ (interactive "*r\nFWrite decoded region to file: ")
+ (as-binary-process
+ (apply (function call-process-region)
+ start end (car quoted-printable-external-decoder)
+ nil nil nil
+ (append (cdr quoted-printable-external-decoder)
+ quoted-printable-external-decoder-option-to-specify-file
+ (list filename)))))