From: teranisi Date: Tue, 27 Jan 2004 14:16:39 +0000 (+0000) Subject: * mel-q.el (quoted-printable-external-decoder-option-to-specify-file): X-Git-Tag: flim-1_14_7~25 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=cc05f88f9fa371737ce3c6de227885bbc30450d1;p=elisp%2Fflim.git * mel-q.el (quoted-printable-external-decoder-option-to-specify-file): Accept nil. (mime-write-decoded-region): If the value of the variable `quoted-printable-external-decoder-option-to-specify-file' is nil, write stdout to the output file. * mel-b-el.el (base64-external-decoder-option-to-specify-file): Accept nil. (base64-write-decoded-region): If the value of the variable `base64-external-decoder-option-to-specify-file' is nil, write stdout to the output file. --- diff --git a/ChangeLog b/ChangeLog index cda5da5..4cc011b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2004-01-27 Yuuichi Teranishi + + * mel-q.el (quoted-printable-external-decoder-option-to-specify-file): + Accept nil. + (mime-write-decoded-region): If the value of the variable + `quoted-printable-external-decoder-option-to-specify-file' is nil, + write stdout to the output file. + + * mel-b-el.el (base64-external-decoder-option-to-specify-file): + Accept nil. + (base64-write-decoded-region): If the value of the variable + `base64-external-decoder-option-to-specify-file' is nil, write + stdout to the output file. + 2004-01-12 Daiki Ueno * sasl.texi: Texinfo markup fixes. From Jesper Harder @@ -179,7 +193,7 @@ 2002-06-03 MORIOKA Tomohiko - * FLIM: Version 1.14.4 (Kashiharajing-Dþ-mae)-A released. + * FLIM: Version 1.14.4 (Kashiharajing.DŽþ-mae) released. 2002-01-16 Hiroya Murata @@ -230,7 +244,7 @@ 2001-06-01 MORIOKA Tomohiko - * FLIM: Version 1.14.3 (Unebigory-Dòmae)-A released. + * FLIM: Version 1.14.3 (UnebigoryŽòmae) released. 2001-06-01 Katsumi Yamaoka @@ -1292,7 +1306,7 @@ 2000-07-12 MORIOKA Tomohiko - * FLIM-Chao: Version 1.14.1 (Rokujiz-Dò)-A released. + * FLIM-Chao: Version 1.14.1 (RokujizŽò) released. 2000-07-10 MORIOKA Tomohiko @@ -1910,7 +1924,7 @@ 1999-05-31 MORIOKA Tomohiko - * FLIM: Version 1.12.7 (Y-Dþzaki)-A released. + * FLIM: Version 1.12.7 (YŽþzaki) released. 1999-05-31 MORIOKA Tomohiko @@ -2085,7 +2099,7 @@ 1999-05-11 MORIOKA Tomohiko - * FLIM: Version 1.12.6 (Family-K-Dòenmae)-A released. + * FLIM: Version 1.12.6 (Family-KŽòenmae) released. 1999-04-27 Shuhei KOBAYASHI @@ -2202,7 +2216,7 @@ 1999-01-23 MORIOKA Tomohiko - * FLIM: Version 1.12.3 (Kintetsu-K-Dòriyama)-A released. + * FLIM: Version 1.12.3 (Kintetsu-KŽòriyama) released. 1999-01-23 MORIOKA Tomohiko @@ -2245,7 +2259,7 @@ 1999-01-21 MORIOKA Tomohiko - * FLIM: Version 1.12.2 (Kuj-Dò)-A released. + * FLIM: Version 1.12.2 (KujŽò) released. 1999-01-16 MORIOKA Tomohiko @@ -2431,7 +2445,7 @@ 1998-12-02 MORIOKA Tomohiko - * FLIM: Version 1.12.1 (Nishinoky-Dò)-A released. + * FLIM: Version 1.12.1 (NishinokyŽò) released. 1998-11-30 MORIOKA Tomohiko @@ -2649,7 +2663,7 @@ 1998-10-26 MORIOKA Tomohiko - * FLIM: Version 1.11.2 (Heij-Dò)-A was released. + * FLIM: Version 1.11.2 (HeijŽò) was released. * NEWS (Abolish variable `mime-temp-directory'): New subsection. @@ -2929,7 +2943,7 @@ 1998-10-12 MORIOKA Tomohiko - * FLIM: Version 1.10.4 (Shin-H-Dòsono)-A was released. + * FLIM: Version 1.10.4 (Shin-HŽòsono) was released. 1998-10-12 Katsumi Yamaoka @@ -3114,7 +3128,7 @@ 1998-09-29 MORIOKA Tomohiko - * FLIM: Version 1.10.0 (K-Dòdo)-A was released. + * FLIM: Version 1.10.0 (KŽòdo) was released. * README.en (What's FLIM): Add mel-ccl.el. @@ -3401,7 +3415,7 @@ 1998-08-31 MORIOKA Tomohiko - * FLIM: Version 1.9.1 (Tonosh-Dò)-A was released. + * FLIM: Version 1.9.1 (TonoshŽò) was released. * mime-en.sgml (mm-backend): Translate a little. @@ -3544,7 +3558,7 @@ 1998-07-07 MORIOKA Tomohiko - * FLIM-Chao: Version 1.8.0 (Shij-Dò)-A was released. + * FLIM-Chao: Version 1.8.0 (ShijŽò) was released. 1998-07-07 MORIOKA Tomohiko @@ -3656,7 +3670,7 @@ 1998-07-01 MORIOKA Tomohiko - * FLIM: Version 1.8.0 (-DÒkubo)-A was released. + * FLIM: Version 1.8.0 (ŽÒkubo) was released. * README.en: Delete `How to use'. @@ -3781,7 +3795,7 @@ 1998-06-28 MORIOKA Tomohiko - * FLIM-Chao: Version 1.7.0 (Goj-Dò)-A was released. + * FLIM-Chao: Version 1.7.0 (GojŽò) was released. 1998-06-26 MORIOKA Tomohiko @@ -4040,7 +4054,7 @@ 1998-06-19 MORIOKA Tomohiko - * FLIM: Version 1.4.1 (Momoyama-Gory-Dòmae)-A was released. + * FLIM: Version 1.4.1 (Momoyama-GoryŽòmae) was released. 1998-06-18 MORIOKA Tomohiko @@ -4160,7 +4174,7 @@ 1998-05-06 MORIOKA Tomohiko - * FLIM: Version 1.2.0 (J-Dþjò)-A was released. + * FLIM: Version 1.2.0 (JŽþjŽò) was released. * README.en (What's FLIM): Delete description about std11-parse.el; add description about mailcap.el. @@ -4211,7 +4225,7 @@ 1998-05-05 MORIOKA Tomohiko - * FLIM: Version 1.1.0 (T-Dòji)-A was released. + * FLIM: Version 1.1.0 (TŽòji) was released. 1998-05-04 MORIOKA Tomohiko @@ -4247,7 +4261,7 @@ 1998-04-17 MORIOKA Tomohiko - * FLIM: Version 1.0.1 (Ky-Dòto)-A was released. + * FLIM: Version 1.0.1 (KyŽòto) was released. * mime-def.el (mime-spadework-module-version-string): New constant. diff --git a/mel-b-el.el b/mel-b-el.el index f8a13ef..eac60b5 100644 --- a/mel-b-el.el +++ b/mel-b-el.el @@ -50,7 +50,8 @@ :type '(cons (file :tag "Command")(repeat :tag "Arguments" string))) (defcustom base64-external-decoder-option-to-specify-file '("-o") - "*list of options of base64 decoder program to specify file." + "*list of options of base64 decoder program to specify file. +If the base64 decoder program does not have such option, set this as nil." :group 'base64 :type '(repeat :tag "Arguments" string)) @@ -368,13 +369,22 @@ START and END are buffer positions." (interactive "*r\nFWrite decoded region to file: ") (if (and base64-internal-decoding-limit (> (- end start) base64-internal-decoding-limit)) - (as-binary-process - (apply (function call-process-region) - start end (car base64-external-decoder) - nil nil nil - (append (cdr base64-external-decoder) - base64-external-decoder-option-to-specify-file - (list filename)))) + (progn + (as-binary-process + (apply (function call-process-region) + start end (car base64-external-decoder) + (null base64-external-decoder-option-to-specify-file) + (unless base64-external-decoder-option-to-specify-file + (list (current-buffer) nil)) + nil + (delq nil + (append + (cdr base64-external-decoder) + base64-external-decoder-option-to-specify-file + (when base64-external-decoder-option-to-specify-file + (list filename)))))) + (unless base64-external-decoder-option-to-specify-file + (write-region-as-binary (point-min) (point-max) filename))) (let ((str (buffer-substring start end))) (with-temp-buffer (insert (base64-internal-decode-string str)) 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