* Sync up to flim-1_10_5 from flim-1_10_2. doodle-1_10_2
authorakr <akr>
Wed, 14 Oct 1998 12:40:26 +0000 (12:40 +0000)
committerakr <akr>
Wed, 14 Oct 1998 12:40:26 +0000 (12:40 +0000)
* mime-def.el (mime-library-product): Bump up to FLAM-DOODLE
1.10.2.

14 files changed:
ChangeLog
DOODLE-VERSION
FLIM-CFG
FLIM-ELS
FLIM-MK
FLIM-VERSION
Makefile
README.en
eword-decode.el
mel-b-dl.el
mel-b.el
mel-ccl.el
mel.el
mime-def.el

index bd87f77..0fbe9c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+1998-10-14  Tanaka Akira      <akr@jaist.ac.jp>
+
+       * Sync up to flim-1_10_5 from flim-1_10_2.
+
+       * mime-def.el (mime-library-product): Bump up to FLAM-DOODLE
+       1.10.2.
+
 1998-10-09  Tanaka Akira      <akr@jaist.ac.jp>
 
        * mime-def.el (mime-library-product): Fix typo.
 1998-10-09  Tanaka Akira      <akr@jaist.ac.jp>
 
        * mime-def.el (mime-library-product): Fix typo.
        * eword-decode.el: Copied from AKEMI branch of SEMI.
 
 \f
        * eword-decode.el: Copied from AKEMI branch of SEMI.
 
 \f
+1998-10-14  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * FLIM: Version 1.10.5 (Kizugawadai) was released.
+
+       * mel.el: Must require poem.
+
+\f
+1998-10-12  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * FLIM: Version 1.10.4 (Shin-H\e-Dòsono)\e-A was released.
+
+1998-10-12  Katsumi Yamaoka   <yamaoka@jpl.org>
+
+       * README.en: Add explanation about `VERSION_SPECIFIC_LISPDIR'.
+
+       * Makefile (install): Add new arg `VERSION_SPECIFIC_LISPDIR'.
+       (elc): Likewise.
+
+       * FLIM-MK (config-flim): Refer to `VERSION_SPECIFIC_LISPDIR'.
+
+       * FLIM-CFG (VERSION_SPECIFIC_LISPDIR): New variable.
+
+1998-10-12  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mel.el (mel-ccl-module): Require path-util when the running
+       emacs has MULE.
+
+       * mel.el: Don't require emu.
+
+1998-10-11  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * FLIM-ELS: Don't install mel-ccl in anything older than XEmacs 21
+       with MULE.
+
+\f
+1998-10-10  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * FLIM: Version 1.10.3 (Komada) was released.
+
+       * mel-ccl.el (base64-ccl-write-decoded-region): bind
+       `jka-compr-compression-info-list' with nil.
+
+       * mel-b.el (base64-internal-decoding-limit): Switch default value
+       between XEmacs-mule and other emacsen.
+       Abolish function `base64-decode-string!'.
+       (base64-internal-decode-region): New implementation.
+       (base64-insert-encoded-file): New function.
+       (mime-insert-encoded-file): Use `base64-insert-encoded-file'.
+       (base64-write-decoded-region): New function.
+       (mime-write-decoded-region): Use `base64-write-decoded-region'.
+
+       * mel-b-dl.el (decode-base64-region): Renamed from
+       `base64-decode-region'.
+       (mime-insert-encoded-file): Change temporary-buffer to unibyte
+       representation.  Abolish method `mime-write-decoded-region'
+       because it is slower than CCL based implementation.
+
+1998-10-09  Tanaka Akira <akr@jaist.ac.jp>
+
+       * mel-ccl.el: Check `ccl-execute-eof-block-on-decoding-some'
+       facility instead of `ccl-execute-eof-block-on-encoding-some'.
+
+1998-10-09  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mel-b.el (base64-characters): Enclose with `eval-and-compile'.
+
+       * eword-decode.el (eword-encoded-text-regexp): Enclose with
+       `eval-and-compile'.
+       (eword-encoded-word-regexp): Use `eval-when-compile'.
+
+1998-10-09  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * eword-decode.el (eword-max-size-to-decode): New user option.
+       (eword-decode-and-fold-structured-field): Do nothing if size of
+       input is bigger than `eword-max-size-to-decode'.
+
+1998-10-08  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mel-b.el (base64-numbers): Use `eval-when-compile'.
+
+1998-10-09  Katsumi Yamaoka   <yamaoka@jpl.org>
+
+       * FLIM-CFG: Use `add-latest-path' instead of `add-path' for adding
+       "custom" to load-path.
+
+1998-10-09  Katsumi Yamaoka   <yamaoka@jpl.org>
+
+       * mime-def.el (mime-library-product): Enclose with
+       `eval-and-compile'.
+
+       * FLIM-CFG: Add "custom" to load-path.
+
+\f
 1998-10-08  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
        * FLIM: Version 1.10.2 (Kintetsu-Miyazu) was released.
 1998-10-08  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
        * FLIM: Version 1.10.2 (Kintetsu-Miyazu) was released.
index f6dac3a..2045ad2 100644 (file)
@@ -21,7 +21,7 @@ Order is not significant.
   15 \e$B?<;Y;R\e(B      \e$B$3$-$/$A$J$7\e(B              10YR7.5/8.0     FLAM-DOODLE 1.9.5
   16 \e$B4;;R\e(B        \e$B$3$&$8\e(B                    7.5YR7.0/11.0   FLAM-DOODLE 1.10.0
   17 \e$B5`MU\e(B        \e$B$/$A$P\e(B                    10YR7.5/10.0    FLAM-DOODLE 1.10.1
   15 \e$B?<;Y;R\e(B      \e$B$3$-$/$A$J$7\e(B              10YR7.5/8.0     FLAM-DOODLE 1.9.5
   16 \e$B4;;R\e(B        \e$B$3$&$8\e(B                    7.5YR7.0/11.0   FLAM-DOODLE 1.10.0
   17 \e$B5`MU\e(B        \e$B$/$A$P\e(B                    10YR7.5/10.0    FLAM-DOODLE 1.10.1
-  18 \e$B@VGrFK\e(B      \e$B$"$+$7$m$D$k$P$_\e(B  5.0YR8.0/6.0
+  18 \e$B@VGrFK\e(B      \e$B$"$+$7$m$D$k$P$_\e(B  5.0YR8.0/6.0    FLAM-DOODLE 1.10.2
   19 \e$B>.F&\e(B        \e$B$"$:$-\e(B                    2.5R3.5/5.0
   20 \e$BIrF:Cc\e(B      \e$B$($S$A$c\e(B          5.0R4.0/11.0
   21 \e$B??<k\e(B        \e$B$7$s$7$e\e(B          2.5R4.5/10.0
   19 \e$B>.F&\e(B        \e$B$"$:$-\e(B                    2.5R3.5/5.0
   20 \e$BIrF:Cc\e(B      \e$B$($S$A$c\e(B          5.0R4.0/11.0
   21 \e$B??<k\e(B        \e$B$7$s$7$e\e(B          2.5R4.5/10.0
index 37ddd2a..57565ab 100644 (file)
--- a/FLIM-CFG
+++ b/FLIM-CFG
       (add-to-list 'load-path (expand-file-name "apel" LISPDIR))
       ))
 
       (add-to-list 'load-path (expand-file-name "apel" LISPDIR))
       ))
 
+(defvar VERSION_SPECIFIC_LISPDIR nil)
+
+(if VERSION_SPECIFIC_LISPDIR
+    (add-to-list 'load-path VERSION_SPECIFIC_LISPDIR))
+
 (require 'install)
 
 (require 'install)
 
+(add-latest-path "custom")
+
 (add-path default-directory)
 
 (or (fboundp 'write-region-as-binary)
 (add-path default-directory)
 
 (or (fboundp 'write-region-as-binary)
index bb5e91c..bdf113d 100644 (file)
--- a/FLIM-ELS
+++ b/FLIM-ELS
@@ -36,7 +36,9 @@
   )
 
 (if (and (featurep 'mule)
   )
 
 (if (and (featurep 'mule)
-        (not (and (boundp 'MULE) MULE)))
+        (not (or (and (boundp 'MULE) MULE)
+                 (and (featurep 'xemacs) (< emacs-major-version 21))
+                 )))
     (setq flim-modules (cons 'mel-ccl flim-modules))
   )
 
     (setq flim-modules (cons 'mel-ccl flim-modules))
   )
 
diff --git a/FLIM-MK b/FLIM-MK
index 3909556..8c7dc25 100644 (file)
--- a/FLIM-MK
+++ b/FLIM-MK
@@ -1,10 +1,10 @@
 ;;; -*-Emacs-Lisp-*-
 ;;;
 ;;; -*-Emacs-Lisp-*-
 ;;;
-;;; $Id: FLIM-MK,v 1.1.16.1 1998-09-15 08:16:45 akr Exp $
+;;; $Id: FLIM-MK,v 1.1.16.2 1998-10-14 12:40:10 akr Exp $
 ;;;
 
 (defun config-flim ()
 ;;;
 
 (defun config-flim ()
-  (let (prefix lisp-dir)
+  (let (prefix lisp-dir version-specific-lisp-dir)
     (and (setq prefix (car command-line-args-left))
         (or (string-equal "NONE" prefix)
             (defvar PREFIX prefix)
     (and (setq prefix (car command-line-args-left))
         (or (string-equal "NONE" prefix)
             (defvar PREFIX prefix)
             (defvar LISPDIR lisp-dir)
             ))
     (setq command-line-args-left (cdr command-line-args-left))
             (defvar LISPDIR lisp-dir)
             ))
     (setq command-line-args-left (cdr command-line-args-left))
+    (and (setq version-specific-lisp-dir (car command-line-args-left))
+        (or (string-equal "NONE" version-specific-lisp-dir)
+            (progn
+              (defvar VERSION_SPECIFIC_LISPDIR version-specific-lisp-dir)
+              (princ (format "VERSION_SPECIFIC_LISPDIR=%s\n"
+                             VERSION_SPECIFIC_LISPDIR)))
+            ))
+    (setq command-line-args-left (cdr command-line-args-left))
     (load-file "FLIM-CFG")
     (load-file "FLIM-ELS")
     (princ (format "PREFIX=%s
     (load-file "FLIM-CFG")
     (load-file "FLIM-ELS")
     (princ (format "PREFIX=%s
index 11c4653..9f82250 100644 (file)
@@ -25,9 +25,9 @@
 1.10.0 K\e-Dòdo\e-A                      \e$(B6=8M\e(B
 1.10.1 Miyamaki                \e$(B;0;3LZ\e(B
 1.10.2 Kintetsu-Miyazu         \e$(B6aE45\DE\e(B
 1.10.0 K\e-Dòdo\e-A                      \e$(B6=8M\e(B
 1.10.1 Miyamaki                \e$(B;0;3LZ\e(B
 1.10.2 Kintetsu-Miyazu         \e$(B6aE45\DE\e(B
------  Komada                  \e$(B9}ED\e(B
------  Shin-H\e-Dòsono\e-A               \e$(B?7=K1`\e(B           ; <=> JR \e$(BJRD.@~\e(B \e$(B=K1`\e(B
------  Kizugawadai             \e$(BLZDE@nBf\e(B
+1.10.3 Komada                  \e$(B9}ED\e(B
+1.10.4 Shin-H\e-Dòsono\e-A               \e$(B?7=K1`\e(B           ; <=> JR \e$(BJRD.@~\e(B \e$(B=K1`\e(B
+1.10.5 Kizugawadai             \e$(BLZDE@nBf\e(B
 -----  Yamadagawa              \e$(B;3ED@n\e(B
 -----  Takanohara              \e$(B9b$N86\e(B
 -----  Heij\e-Dò\e-A                     \e$(BJ?>k\e(B
 -----  Yamadagawa              \e$(B;3ED@n\e(B
 -----  Takanohara              \e$(B9b$N86\e(B
 -----  Heij\e-Dò\e-A                     \e$(BJ?>k\e(B
index e06536a..6cc57d9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
 #
 
 PACKAGE = flim
 #
 
 PACKAGE = flim
-VERSION = 1.10.2
+VERSION = 1.10.5
 
 TAR    = tar
 RM     = /bin/rm -f
 
 TAR    = tar
 RM     = /bin/rm -f
@@ -17,6 +17,7 @@ FLAGS_CURDIR   = $(FLAGS) -eval '(setq load-path (cons "." load-path))'
 PREFIX = NONE
 LISPDIR = NONE
 PACKAGEDIR = NONE
 PREFIX = NONE
 LISPDIR = NONE
 PACKAGEDIR = NONE
+VERSION_SPECIFIC_LISPDIR = NONE
 
 GOMI   = *.elc \
          *.cp *.cps *.ky *.kys *.fn *.fns *.vr *.vrs \
 
 GOMI   = *.elc \
          *.cp *.cps *.ky *.kys *.fn *.fns *.vr *.vrs \
@@ -25,10 +26,12 @@ FILES       = README.?? Makefile FLIM-MK FLIM-CFG FLIM-ELS *.el ChangeLog
 
 
 elc: ew-parse.el
 
 
 elc: ew-parse.el
-       $(EMACS) $(FLAGS) -l FLIM-MK -f compile-flim $(PREFIX) $(LISPDIR)
+       $(EMACS) $(FLAGS) -l FLIM-MK -f compile-flim $(PREFIX) $(LISPDIR) \
+               $(VERSION_SPECIFIC_LISPDIR)
 
 install:       elc
 
 install:       elc
-       $(EMACS) $(FLAGS) -l FLIM-MK -f install-flim $(PREFIX) $(LISPDIR)
+       $(EMACS) $(FLAGS) -l FLIM-MK -f install-flim $(PREFIX) $(LISPDIR) \
+               $(VERSION_SPECIFIC_LISPDIR)
 
 
 package:
 
 
 package:
@@ -56,7 +59,7 @@ tar:
        sed "s/VERSION/$(VERSION)/" < ftp.in > ftp
 
 release:
        sed "s/VERSION/$(VERSION)/" < ftp.in > ftp
 
 release:
-       -$(RM) /pub/GNU/elisp/apel/$(PACKAGE)-$(VERSION).tar.gz
+       -$(RM) /pub/GNU/elisp/flim/$(PACKAGE)-$(VERSION).tar.gz
        mv /tmp/$(PACKAGE)-$(VERSION).tar.gz /pub/GNU/elisp/flim/
        cd /pub/GNU/elisp/semi/ ; \
                ln -s ../flim/$(PACKAGE)-$(VERSION).tar.gz .
        mv /tmp/$(PACKAGE)-$(VERSION).tar.gz /pub/GNU/elisp/flim/
        cd /pub/GNU/elisp/semi/ ; \
                ln -s ../flim/$(PACKAGE)-$(VERSION).tar.gz .
index ce7ff24..4dce259 100644 (file)
--- a/README.en
+++ b/README.en
@@ -87,6 +87,12 @@ Installation
   emacs command is used (perhaps /usr/local/share/emacs/site-lisp or
   /usr/local/lib/xemacs/site-lisp).
 
   emacs command is used (perhaps /usr/local/share/emacs/site-lisp or
   /usr/local/lib/xemacs/site-lisp).
 
+  If the emu modules (included in APEL package) have been installed in
+  the non-standard directory, you should specify where they will be
+  found, for example:
+
+       % make install VERSION_SPECIFIC_LISPDIR=~/elisp
+
   You can specify other optional settings by editing the file
   FLIM-CFG.  Please read comments in it.
 
   You can specify other optional settings by editing the file
   FLIM-CFG.  Please read comments in it.
 
index 9982cbd..42beb16 100644 (file)
@@ -69,6 +69,12 @@ however this behaviour violates RFC2047."
   :group 'eword-decode
   :type 'boolean)
 
   :group 'eword-decode
   :type 'boolean)
 
+(defcustom eword-max-size-to-decode 1000
+  "*Max size to decode header field."
+  :group 'eword-decode
+  :type '(choice (integer :tag "Limit (bytes)")
+                (const :tag "Don't limit" nil)))
+
 
 ;;; @ MIME encoded-word definition
 ;;;
 
 ;;; @ MIME encoded-word definition
 ;;;
@@ -316,6 +322,91 @@ default-mime-charset."
     code-conversion
     must-unfold))
 
     code-conversion
     must-unfold))
 
+(defun eword-decode-and-fold-structured-field
+  (string start-column &optional max-column must-unfold)
+  "Decode and fold (fill) STRING as structured field body.
+It decodes non us-ascii characters in FULL-NAME encoded as
+encoded-words or invalid \"raw\" string.  \"Raw\" non us-ascii
+characters are regarded as variable `default-mime-charset'.
+
+If an encoded-word is broken or your emacs implementation can not
+decode the charset included in it, it is not decoded.
+
+If MAX-COLUMN is omitted, `fill-column' is used.
+
+If MUST-UNFOLD is non-nil, it unfolds and eliminates line-breaks even
+if there are in decoded encoded-words (generated by bad manner MUA
+such as a version of Net$cape)."
+  (rotate-memo args-eword-decode-and-fold-structured-field
+              (list string start-column max-column must-unfold))
+  (or max-column
+      (setq max-column fill-column))
+  (let* ((field-name (make-string (1- start-column) ?X))
+        (field-body (ew-lf-crlf-to-crlf string))
+        (ew-decode-field-default-syntax '(ew-scan-unibyte-std11))
+        (decoded (ew-decode-field field-name field-body)))
+    (unless (equal field-body decoded)
+      (setq decoded (ew-crlf-refold decoded start-column max-column)))
+    (ew-crlf-to-lf decoded)))
+
+(defun eword-decode-and-unfold-structured-field (string)
+  "Decode and unfold STRING as structured field body.
+It decodes non us-ascii characters in FULL-NAME encoded as
+encoded-words or invalid \"raw\" string.  \"Raw\" non us-ascii
+characters are regarded as variable `default-mime-charset'.
+
+If an encoded-word is broken or your emacs implementation can not
+decode the charset included in it, it is not decoded."
+  (rotate-memo args-eword-decode-and-unfold-structured-field (list string))
+  (let* ((ew-decode-field-default-syntax '(ew-scan-unibyte-std11))
+        (decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string))))
+    (ew-crlf-to-lf (ew-crlf-unfold decoded))))
+
+(defun eword-decode-structured-field-body (string &optional must-unfold
+                                                 start-column max-column)
+  "Decode non us-ascii characters in STRING as structured field body.
+STRING is unfolded before decoding.
+
+It decodes non us-ascii characters in FULL-NAME encoded as
+encoded-words or invalid \"raw\" string.  \"Raw\" non us-ascii
+characters are regarded as variable `default-mime-charset'.
+
+If an encoded-word is broken or your emacs implementation can not
+decode the charset included in it, it is not decoded.
+
+If MUST-UNFOLD is non-nil, it unfolds and eliminates line-breaks even
+if there are in decoded encoded-words (generated by bad manner MUA
+such as a version of Net$cape)."
+  (rotate-memo args-eword-decode-structured-field-body
+              (list string must-unfold start-column max-column))
+  (if start-column
+      ;; fold with max-column
+      (eword-decode-and-fold-structured-field
+       string start-column max-column must-unfold)
+    ;; Don't fold
+    (let* ((ew-decode-field-default-syntax '(ew-scan-unibyte-std11))
+          (decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string))))
+      (ew-crlf-to-lf decoded))))
+
+(defun eword-decode-unstructured-field-body (string &optional must-unfold)
+  "Decode non us-ascii characters in STRING as unstructured field body.
+STRING is unfolded before decoding.
+
+It decodes non us-ascii characters in FULL-NAME encoded as
+encoded-words or invalid \"raw\" string.  \"Raw\" non us-ascii
+characters are regarded as variable `default-mime-charset'.
+
+If an encoded-word is broken or your emacs implementation can not
+decode the charset included in it, it is not decoded.
+
+If MUST-UNFOLD is non-nil, it unfolds and eliminates line-breaks even
+if there are in decoded encoded-words (generated by bad manner MUA
+such as a version of Net$cape)."
+  (rotate-memo args-eword-decode-unstructured-field-body
+              (list string must-unfold))
+  (let ((decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string))))
+    (ew-crlf-to-lf (ew-crlf-unfold decoded))))
+
 
 ;;; @ for region
 ;;;
 
 ;;; @ for region
 ;;;
@@ -660,91 +751,6 @@ characters encoded as encoded-words or invalid \"raw\" format.
 (defun eword-decode-token (token)
   (cdr token))
 
 (defun eword-decode-token (token)
   (cdr token))
 
-(defun eword-decode-and-fold-structured-field
-  (string start-column &optional max-column must-unfold)
-  "Decode and fold (fill) STRING as structured field body.
-It decodes non us-ascii characters in FULL-NAME encoded as
-encoded-words or invalid \"raw\" string.  \"Raw\" non us-ascii
-characters are regarded as variable `default-mime-charset'.
-
-If an encoded-word is broken or your emacs implementation can not
-decode the charset included in it, it is not decoded.
-
-If MAX-COLUMN is omitted, `fill-column' is used.
-
-If MUST-UNFOLD is non-nil, it unfolds and eliminates line-breaks even
-if there are in decoded encoded-words (generated by bad manner MUA
-such as a version of Net$cape)."
-  (rotate-memo args-eword-decode-and-fold-structured-field
-              (list string start-column max-column must-unfold))
-  (or max-column
-      (setq max-column fill-column))
-  (let* ((field-name (make-string (1- start-column) ?X))
-        (field-body (ew-lf-crlf-to-crlf string))
-        (ew-decode-field-default-syntax '(ew-scan-unibyte-std11))
-        (decoded (ew-decode-field field-name field-body)))
-    (unless (equal field-body decoded)
-      (setq decoded (ew-crlf-refold decoded start-column max-column)))
-    (ew-crlf-to-lf decoded)))
-
-(defun eword-decode-and-unfold-structured-field (string)
-  "Decode and unfold STRING as structured field body.
-It decodes non us-ascii characters in FULL-NAME encoded as
-encoded-words or invalid \"raw\" string.  \"Raw\" non us-ascii
-characters are regarded as variable `default-mime-charset'.
-
-If an encoded-word is broken or your emacs implementation can not
-decode the charset included in it, it is not decoded."
-  (rotate-memo args-eword-decode-and-unfold-structured-field (list string))
-  (let* ((ew-decode-field-default-syntax '(ew-scan-unibyte-std11))
-        (decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string))))
-    (ew-crlf-to-lf (ew-crlf-unfold decoded))))
-
-(defun eword-decode-structured-field-body (string &optional must-unfold
-                                                 start-column max-column)
-  "Decode non us-ascii characters in STRING as structured field body.
-STRING is unfolded before decoding.
-
-It decodes non us-ascii characters in FULL-NAME encoded as
-encoded-words or invalid \"raw\" string.  \"Raw\" non us-ascii
-characters are regarded as variable `default-mime-charset'.
-
-If an encoded-word is broken or your emacs implementation can not
-decode the charset included in it, it is not decoded.
-
-If MUST-UNFOLD is non-nil, it unfolds and eliminates line-breaks even
-if there are in decoded encoded-words (generated by bad manner MUA
-such as a version of Net$cape)."
-  (rotate-memo args-eword-decode-structured-field-body
-              (list string must-unfold start-column max-column))
-  (if start-column
-      ;; fold with max-column
-      (eword-decode-and-fold-structured-field
-       string start-column max-column must-unfold)
-    ;; Don't fold
-    (let* ((ew-decode-field-default-syntax '(ew-scan-unibyte-std11))
-          (decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string))))
-      (ew-crlf-to-lf decoded))))
-
-(defun eword-decode-unstructured-field-body (string &optional must-unfold)
-  "Decode non us-ascii characters in STRING as unstructured field body.
-STRING is unfolded before decoding.
-
-It decodes non us-ascii characters in FULL-NAME encoded as
-encoded-words or invalid \"raw\" string.  \"Raw\" non us-ascii
-characters are regarded as variable `default-mime-charset'.
-
-If an encoded-word is broken or your emacs implementation can not
-decode the charset included in it, it is not decoded.
-
-If MUST-UNFOLD is non-nil, it unfolds and eliminates line-breaks even
-if there are in decoded encoded-words (generated by bad manner MUA
-such as a version of Net$cape)."
-  (rotate-memo args-eword-decode-unstructured-field-body
-              (list string must-unfold))
-  (let ((decoded (ew-decode-field "" (ew-lf-crlf-to-crlf string))))
-    (ew-crlf-to-lf (ew-crlf-unfold decoded))))
-
 (defun eword-extract-address-components (string)
   "Extract full name and canonical address from STRING.
 Returns a list of the form (FULL-NAME CANONICAL-ADDRESS).
 (defun eword-extract-address-components (string)
   "Extract full name and canonical address from STRING.
 Returns a list of the form (FULL-NAME CANONICAL-ADDRESS).
index 0f0f22e..3adea3d 100644 (file)
@@ -47,7 +47,7 @@ START and END are buffer positions."
       (insert "\n"))
   )
 
       (insert "\n"))
   )
 
-(defun base64-decode-region (start end)
+(defun decode-base64-region (start end)
   "Decode current region by base64.
 START and END are buffer positions."
   (interactive "r")
   "Decode current region by base64.
 START and END are buffer positions."
   (interactive "r")
@@ -69,7 +69,7 @@ START and END are buffer positions."
 (mel-define-method-function (mime-encode-region start end (nil "base64"))
                            'base64-encode-region)
 (mel-define-method-function (mime-decode-region start end (nil "base64"))
 (mel-define-method-function (mime-encode-region start end (nil "base64"))
                            'base64-encode-region)
 (mel-define-method-function (mime-decode-region start end (nil "base64"))
-                           'base64-decode-region)
+                           'decode-base64-region)
 
 (mel-define-method-function (encoded-text-encode-string string (nil "B"))
                            'encode-base64-string)
 
 (mel-define-method-function (encoded-text-encode-string string (nil "B"))
                            'encode-base64-string)
@@ -92,24 +92,25 @@ mmencode included in metamail or XEmacs package)."
   (interactive (list (read-file-name "Insert encoded file: ")))
   (insert (encode-base64-string
           (with-temp-buffer
   (interactive (list (read-file-name "Insert encoded file: ")))
   (insert (encode-base64-string
           (with-temp-buffer
+            (set-buffer-multibyte nil)
             (insert-file-contents-as-binary filename)
             (buffer-string))))
   (or (bolp)
       (insert "\n"))
   )
 
             (insert-file-contents-as-binary filename)
             (buffer-string))))
   (or (bolp)
       (insert "\n"))
   )
 
-(mel-define-method mime-write-decoded-region (start end filename
-                                                   (nil "base64"))
-  "Decode and write current region encoded by base64 into FILENAME.
-START and END are buffer positions."
-  (interactive
-   (list (region-beginning) (region-end)
-        (read-file-name "Write decoded region to file: ")))
-  (let ((str (buffer-substring start end)))
-    (with-temp-buffer
-      (insert (decode-base64-string str))
-      (write-region-as-binary (point-min) (point-max) filename)
-      )))
+;; (mel-define-method mime-write-decoded-region (start end filename
+;;                                                     (nil "base64"))
+;;   "Decode and write current region encoded by base64 into FILENAME.
+;; START and END are buffer positions."
+;;   (interactive
+;;    (list (region-beginning) (region-end)
+;;          (read-file-name "Write decoded region to file: ")))
+;;   (let ((str (buffer-substring start end)))
+;;     (with-temp-buffer
+;;       (insert (decode-base64-string str))
+;;       (write-region-as-binary (point-min) (point-max) filename)
+;;       )))
 
 
 ;;; @ end
 
 
 ;;; @ end
index deb54ff..ad34a37 100644 (file)
--- a/mel-b.el
+++ b/mel-b.el
@@ -60,7 +60,10 @@ external encoder is called."
   :type '(choice (const :tag "Always use internal encoder" nil)
                 (integer :tag "Size")))
 
   :type '(choice (const :tag "Always use internal encoder" nil)
                 (integer :tag "Size")))
 
-(defcustom base64-internal-decoding-limit 70000
+(defcustom base64-internal-decoding-limit (if (and (featurep 'xemacs)
+                                                  (featurep 'mule))
+                                             1000
+                                           7600)
   "*limit size to use internal base64 decoder.
 If size of input to decode is larger than this limit,
 external decoder is called."
   "*limit size to use internal base64 decoder.
 If size of input to decode is larger than this limit,
 external decoder is called."
@@ -72,8 +75,10 @@ external decoder is called."
 ;;; @ internal base64 encoder
 ;;;    based on base64 decoder by Enami Tsugutomo
 
 ;;; @ internal base64 encoder
 ;;;    based on base64 decoder by Enami Tsugutomo
 
-(defconst base64-characters
-  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
+(eval-and-compile
+  (defconst base64-characters
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
+  )
 
 (defmacro base64-num-to-char (n)
   `(aref base64-characters ,n))
 
 (defmacro base64-num-to-char (n)
   `(aref base64-characters ,n))
@@ -147,13 +152,14 @@ external decoder is called."
 ;;;
 
 (defconst base64-numbers
 ;;;
 
 (defconst base64-numbers
-  `,(let ((len (length base64-characters))
+  (eval-when-compile
+    (let ((len (length base64-characters))
          (vec (make-vector 123 nil))
          (i 0))
       (while (< i len)
        (aset vec (aref base64-characters i) i)
        (setq i (1+ i)))
          (vec (make-vector 123 nil))
          (i 0))
       (while (< i len)
        (aset vec (aref base64-characters i) i)
        (setq i (1+ i)))
-      vec))
+      vec)))
 
 (defmacro base64-char-to-num (c)
   `(aref base64-numbers ,c))
 
 (defmacro base64-char-to-num (c)
   `(aref base64-numbers ,c))
@@ -191,15 +197,30 @@ external decoder is called."
 (defun base64-internal-decode-string (string)
   (base64-internal-decode string (make-string (length string) 0)))
 
 (defun base64-internal-decode-string (string)
   (base64-internal-decode string (make-string (length string) 0)))
 
-(defsubst base64-decode-string! (string)
-  (base64-internal-decode string string))
+;; (defsubst base64-decode-string! (string)
+;;   (setq string (string-as-unibyte string))
+;;   (base64-internal-decode string string))
 
 (defun base64-internal-decode-region (beg end)
   (save-excursion
 
 (defun base64-internal-decode-region (beg end)
   (save-excursion
-    (let ((str (buffer-substring beg end)))
+    (let ((str (string-as-unibyte (buffer-substring beg end))))
       (delete-region beg end)
       (goto-char beg)
       (delete-region beg end)
       (goto-char beg)
-      (insert (base64-decode-string! str)))))
+      (insert (base64-internal-decode str str)))))
+
+;; (defun base64-internal-decode-region2 (beg end)
+;;   (save-excursion
+;;     (let ((str (buffer-substring beg end)))
+;;       (delete-region beg end)
+;;       (goto-char beg)
+;;       (insert (base64-decode-string! str)))))
+
+;; (defun base64-internal-decode-region3 (beg end)
+;;   (save-excursion
+;;     (let ((str (buffer-substring beg end)))
+;;       (delete-region beg end)
+;;       (goto-char beg)
+;;       (insert (base64-internal-decode-string str)))))
 
 
 ;;; @ external encoder/decoder
 
 
 ;;; @ external encoder/decoder
@@ -302,7 +323,7 @@ metamail or XEmacs package)."
       (base64-decode-string string)
     (error "Invalid encoded-text %s" string)))
 
       (base64-decode-string string)
     (error "Invalid encoded-text %s" string)))
 
-(mel-define-method mime-insert-encoded-file (filename (nil "base64"))
+(defun base64-insert-encoded-file (filename)
   "Encode contents of file FILENAME to base64, and insert the result.
 It calls external base64 encoder specified by
 `base64-external-encoder'.  So you must install the program (maybe
   "Encode contents of file FILENAME to base64, and insert the result.
 It calls external base64 encoder specified by
 `base64-external-encoder'.  So you must install the program (maybe
@@ -316,14 +337,17 @@ mmencode included in metamail or XEmacs package)."
     (insert
      (base64-encode-string
       (with-temp-buffer
     (insert
      (base64-encode-string
       (with-temp-buffer
+       (set-buffer-multibyte nil)
        (insert-file-contents-as-binary filename)
        (buffer-string))))
     (or (bolp)
        (insert "\n"))
      ))
 
        (insert-file-contents-as-binary filename)
        (buffer-string))))
     (or (bolp)
        (insert "\n"))
      ))
 
-(mel-define-method mime-write-decoded-region (start end filename
-                                                   (nil "base64"))
+(mel-define-method-function (mime-insert-encoded-file filename (nil "base64"))
+                           'base64-insert-encoded-file)
+
+(defun base64-write-decoded-region (start end filename)
   "Decode and write current region encoded by base64 into FILENAME.
 START and END are buffer positions."
   (interactive
   "Decode and write current region encoded by base64 into FILENAME.
 START and END are buffer positions."
   (interactive
@@ -341,7 +365,12 @@ START and END are buffer positions."
     (let ((str (buffer-substring start end)))
       (with-temp-buffer
        (insert (base64-internal-decode-string str))
     (let ((str (buffer-substring start end)))
       (with-temp-buffer
        (insert (base64-internal-decode-string str))
-       (write-region-as-binary (point-min) (point-max) filename)))))
+       (write-region-as-binary (point-min) (point-max) filename)
+       ))))
+
+(mel-define-method-function
+ (mime-write-decoded-region start end filename (nil "base64"))
+ 'base64-write-decoded-region)
 
        
 ;;; @ etc
 
        
 ;;; @ etc
index e50ad5f..12b18e1 100644 (file)
@@ -1173,7 +1173,7 @@ abcdefghijklmnopqrstuvwxyz\
 ;;; @ B
 ;;;
 
 ;;; @ B
 ;;;
 
-(unless-broken ccl-execute-eof-block-on-encoding-some
+(unless-broken ccl-execute-eof-block-on-decoding-some
 
   (defun base64-ccl-encode-string (string)
     "Encode STRING with base64 encoding."
 
   (defun base64-ccl-encode-string (string)
     "Encode STRING with base64 encoding."
@@ -1216,7 +1216,8 @@ abcdefghijklmnopqrstuvwxyz\
   (interactive
     (list (region-beginning) (region-end)
           (read-file-name "Write decoded region to file: ")))
   (interactive
     (list (region-beginning) (region-end)
           (read-file-name "Write decoded region to file: ")))
-  (let ((coding-system-for-write 'mel-ccl-b-rev))
+  (let ((coding-system-for-write 'mel-ccl-b-rev)
+       jka-compr-compression-info-list)
     (write-region start end filename)))
 
 (mel-define-method-function (mime-decode-string string (nil "base64"))
     (write-region start end filename)))
 
 (mel-define-method-function (mime-decode-string string (nil "base64"))
@@ -1237,7 +1238,7 @@ abcdefghijklmnopqrstuvwxyz\
 ;;; @ quoted-printable
 ;;;
 
 ;;; @ quoted-printable
 ;;;
 
-(unless-broken ccl-execute-eof-block-on-encoding-some
+(unless-broken ccl-execute-eof-block-on-decoding-some
 
   (defun quoted-printable-ccl-encode-string (string)
     "Encode STRING with quoted-printable encoding."
 
   (defun quoted-printable-ccl-encode-string (string)
     "Encode STRING with quoted-printable encoding."
diff --git a/mel.el b/mel.el
index 9495b46..1ccc8b5 100644 (file)
--- a/mel.el
+++ b/mel.el
@@ -25,8 +25,8 @@
 
 ;;; Code:
 
 
 ;;; Code:
 
-(require 'emu)
 (require 'mime-def)
 (require 'mime-def)
+(require 'poem)
 
 (defcustom mime-encoding-list
   '("7bit" "8bit" "binary" "base64" "quoted-printable")
 
 (defcustom mime-encoding-list
   '("7bit" "8bit" "binary" "base64" "quoted-printable")
@@ -81,7 +81,10 @@ Content-Transfer-Encoding for it."
 
 (defvar mel-ccl-module
   (and (featurep 'mule)
 
 (defvar mel-ccl-module
   (and (featurep 'mule)
-       (module-installed-p 'mel-ccl)))
+       (progn
+        (require 'path-util)
+        (module-installed-p 'mel-ccl)
+        )))
 
 (mel-use-module 'mel-b '("base64" "B"))
 (mel-use-module 'mel-q '("quoted-printable" "Q"))
 
 (mel-use-module 'mel-b '("base64" "B"))
 (mel-use-module 'mel-q '("quoted-printable" "Q"))
index baff5ec..2444b42 100644 (file)
 
 ;;; Code:
 
 
 ;;; Code:
 
-(defconst mime-library-product ["FLAM-DOODLE" (1 10 1) "\e$B5`MU\e(B 10YR7.5/10.0"]
-  "Product name, version number and code name of MIME-library package.")
+(eval-and-compile
+  (defconst mime-library-product ["FLAM-DOODLE" (1 10 2) "\e$B@VGrFK\e(B 5.0YR8.0/6.0"]
+    "Product name, version number and code name of MIME-library package.")
+  )
 
 (defmacro mime-product-name (product)
   `(aref ,product 0))
 
 (defmacro mime-product-name (product)
   `(aref ,product 0))