X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mel-q.el;h=5c9f7c547e5c1af8ca51bb3cca6208246aa612ad;hb=e3697d7a1aa5dd7b573c5ff3f320ed03fd6614bd;hp=4a59b02dbfae7a1c76104ae6e9657f4c3b0db9da;hpb=fd82671e71a48c5dfb66052308f7c18e0ff11c09;p=elisp%2Fflim.git diff --git a/mel-q.el b/mel-q.el index 4a59b02..5c9f7c5 100644 --- a/mel-q.el +++ b/mel-q.el @@ -254,7 +254,8 @@ the program (maybe mmencode included in metamail or XEmacs package)." (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")) @@ -264,10 +265,18 @@ START and END are buffer positions." (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))) ;;; @ Q-encoding encode/decode string