(defvar quoted-printable-external-decoder-option-to-specify-file '("-o")
- "*list of options of quoted-printable decoder program to specify file.")
+ "*list of options of quoted-printable decoder program to specify file.
+If the quoted-printable decoder does not have such option, set this as nil.")
(mel-define-method mime-write-decoded-region (start end filename
(nil "quoted-printable"))
(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)))))
+ (null quoted-printable-external-decoder-option-to-specify-file)
+ (unless quoted-printable-external-decoder-option-to-specify-file
+ (list (current-buffer) nil))
+ nil
+ (delq nil
+ (append
+ (cdr quoted-printable-external-decoder)
+ quoted-printable-external-decoder-option-to-specify-file
+ (when quoted-printable-external-decoder-option-to-specify-file
+ (list filename))))))
+ (unless quoted-printable-external-decoder-option-to-specify-file
+ (write-region-as-binary (point-min) (point-max) filename)))
\f
;;; @ Q-encoding encode/decode string