+1997-11-04 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * APEL: Version 4.1 was released.
+
+ * APEL-MK (compile-apel): Use `config-apel'; don't use
+ `add-to-list' for compatibility.
+ (install-apel): Don't call `config-apel' directly.
+
+ * APEL-CFG: Add load-path setting.
+
+1997-11-04 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * emu-20.el (mime-charset-list): New inline-function.
+ (widget-mime-charset-prompt-value-history): New variable.
+ (mime-charset): New widget.
+ (widget-mime-charset-prompt-value): New function.
+ (widget-mime-charset-action): New function.
+ (default-mime-charset): Use `defcustom'.
+
+ * emu-20.el (default-mime-charset): Modify DOC-string.
+
+ * emu-mule.el (charsets-mime-charset-alist): New implementation.
+
+ * emu-e20.el (encode-mime-charset-region,
+ decode-mime-charset-region, encode-mime-charset-string,
+ decode-mime-charset-string): New function (copied from emu-20.el);
+ check `enable-multibyte-characters'.
+
+ * emu-x20.el (encode-mime-charset-region,
+ decode-mime-charset-region, encode-mime-charset-string,
+ decode-mime-charset-string): New function (copied from emu-20.el).
+
+ * emu-20.el: Move function `encode-mime-charset-region',
+ `decode-mime-charset-region', `encode-mime-charset-string' and
+ `decode-mime-charset-string' to emu-x20.el and emu-e20.el.
+
+1997-10-04 MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+ * emu-x20.el (charsets-mime-charset-alist): Use MIME charset
+ `iso-8859-5' for cyrillic.
+
+\f
1997-09-26 MORIOKA Tomohiko <morioka@jaist.ac.jp>
* APEL: Version 3.4.4 was released.
#
-# $Id: Makefile,v 0.13 1997/09/25 16:24:38 morioka Exp $
+# $Id: Makefile,v 0.14 1997/11/04 09:06:02 morioka Exp $
#
-VERSION = 3.4.4
+VERSION = 4.1
-TAR = gtar
+TAR = tar
RM = /bin/rm -f
CP = /bin/cp -p
;; Copyright (C) 1997 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: emu-20.el,v 7.15 1997/09/07 02:57:51 morioka Exp $
+;; Version: $Id: emu-20.el,v 7.18 1997/11/04 08:36:40 morioka Exp $
;; Keywords: emulation, compatibility, Mule
;; This file is part of emu.
;;; Code:
+(require 'custom)
+
+
;;; @ binary access
;;;
(if (find-coding-system charset)
charset))
-(defsubst encode-mime-charset-region (start end charset)
- "Encode the text between START and END as MIME CHARSET."
- (let ((cs (mime-charset-to-coding-system charset)))
- (if cs
- (encode-coding-region start end cs)
- )))
-
-(defsubst decode-mime-charset-region (start end charset)
- "Decode the text between START and END as MIME CHARSET."
- (let ((cs (mime-charset-to-coding-system charset)))
- (if cs
- (decode-coding-region start end cs)
- )))
-
-(defsubst encode-mime-charset-string (string charset)
- "Encode the STRING as MIME CHARSET."
- (let ((cs (mime-charset-to-coding-system charset)))
- (if cs
- (encode-coding-string string cs)
- string)))
-
-(defsubst decode-mime-charset-string (string charset)
- "Decode the STRING as MIME CHARSET."
- (let ((cs (mime-charset-to-coding-system charset)))
- (if cs
- (decode-coding-string string cs)
- string)))
-
-
-(defvar default-mime-charset 'x-ctext
- "Default value of MIME charset used when MIME charset is not specified.
-It must be symbol.")
+(defsubst mime-charset-list ()
+ "Return a list of all existing MIME-charset."
+ (nconc (mapcar (function car) mime-charset-coding-system-alist)
+ (coding-system-list)))
+
+
+(defvar widget-mime-charset-prompt-value-history nil
+ "History of input to `widget-mime-charset-prompt-value'.")
+
+(define-widget 'mime-charset 'coding-system
+ "A mime-charset."
+ :format "%{%t%}: %v"
+ :tag "MIME-charset"
+ :prompt-history 'widget-mime-charset-prompt-value-history
+ :prompt-value 'widget-mime-charset-prompt-value
+ :action 'widget-mime-charset-action)
+
+(defun widget-mime-charset-prompt-value (widget prompt value unbound)
+ ;; Read mime-charset from minibuffer.
+ (intern
+ (completing-read (format "%s (default %s) " prompt value)
+ (mapcar (function
+ (lambda (sym)
+ (list (symbol-name sym))
+ ))
+ (mime-charset-list)))))
+
+(defun widget-mime-charset-action (widget &optional event)
+ ;; Read a mime-charset from the minibuffer.
+ (let ((answer
+ (widget-mime-charset-prompt-value
+ widget
+ (widget-apply widget :menu-tag-get)
+ (widget-value widget)
+ t)))
+ (widget-value-set widget answer)
+ (widget-apply widget :notify widget event)
+ (widget-setup)))
+
+(defcustom default-mime-charset 'x-ctext
+ "Default value of MIME-charset.
+It is used when MIME-charset is not specified.
+It must be symbol."
+ :group 'i18n
+ :type 'mime-charset)
(defsubst detect-mime-charset-region (start end)
"Return MIME charset for region between START and END."
-;;; emu-e20.el --- emu API implementation for Emacs/mule (19.34.91-delta)
+;;; emu-e20.el --- emu API implementation for Emacs 20
;; Copyright (C) 1996,1997 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: emu-e20.el,v 7.24 1997/09/07 02:39:24 morioka Exp $
+;; Version: $Id: emu-e20.el,v 7.26 1997/11/04 09:10:31 morioka Exp $
;; Keywords: emulation, compatibility, Mule
;; This file is part of emu.
;;; Commentary:
-;; This module requires Emacs 20.0.90 or later.
+;; This module requires Emacs 20.1 or later.
;;; Code:
;;; @ MIME charset
;;;
+(defsubst encode-mime-charset-region (start end charset)
+ "Encode the text between START and END as MIME CHARSET."
+ (let (cs)
+ (if (and enable-multibyte-characters
+ (setq cs (mime-charset-to-coding-system charset)))
+ (encode-coding-region start end cs)
+ )))
+
+(defsubst decode-mime-charset-region (start end charset)
+ "Decode the text between START and END as MIME CHARSET."
+ (let (cs)
+ (if (and enable-multibyte-characters
+ (setq cs (mime-charset-to-coding-system charset)))
+ (decode-coding-region start end cs)
+ )))
+
+(defsubst encode-mime-charset-string (string charset)
+ "Encode the STRING as MIME CHARSET."
+ (let (cs)
+ (if (and enable-multibyte-characters
+ (setq cs (mime-charset-to-coding-system charset)))
+ (encode-coding-string string cs)
+ string)))
+
+(defsubst decode-mime-charset-string (string charset)
+ "Decode the STRING as MIME CHARSET."
+ (let (cs)
+ (if (and enable-multibyte-characters
+ (setq cs (mime-charset-to-coding-system charset)))
+ (decode-coding-string string cs)
+ string)))
+
+
(defvar charsets-mime-charset-alist
'(((ascii) . us-ascii)
((ascii latin-iso8859-1) . iso-8859-1)
;; Copyright (C) 1995,1996,1997 MORIOKA Tomohiko
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: emu-mule.el,v 7.64 1997/08/30 09:42:40 morioka Exp $
+;; Version: $Id: emu-mule.el,v 7.65 1997/11/04 08:01:11 morioka Exp $
;; Keywords: emulation, compatibility, Mule
;; This file is part of emu.
(defun encode-coding-region (start end coding-system)
"Encode the text between START and END to CODING-SYSTEM.
-\[emu-mule.el; EMACS 20 emulating function]"
+\[EMACS 20 emulating function]"
(code-convert-region start end *internal* coding-system)
)
(defun decode-coding-region (start end coding-system)
"Decode the text between START and END which is encoded in CODING-SYSTEM.
-\[emu-mule.el; EMACS 20 emulating function]"
+\[EMACS 20 emulating function]"
(code-convert-region start end coding-system *internal*)
)
(defun encode-coding-string (str coding-system)
"Encode the STRING to CODING-SYSTEM.
-\[emu-mule.el; EMACS 20 emulating function]"
+\[EMACS 20 emulating function]"
(code-convert-string str *internal* coding-system)
)
(defun decode-coding-string (str coding-system)
"Decode the string STR which is encoded in CODING-SYSTEM.
-\[emu-mule.el; EMACS 20 emulating function]"
+\[EMACS 20 emulating function]"
(let ((len (length str))
ret)
(while (and
;;; @ MIME charset
;;;
-(defvar charsets-mime-charset-alist
- (list
- (cons (list lc-ascii) 'us-ascii)
- (cons (list lc-ascii lc-ltn1) 'iso-8859-1)
- (cons (list lc-ascii lc-ltn2) 'iso-8859-2)
- (cons (list lc-ascii lc-ltn3) 'iso-8859-3)
- (cons (list lc-ascii lc-ltn4) 'iso-8859-4)
-;;;(cons (list lc-ascii lc-crl) 'iso-8859-5)
- (cons (list lc-ascii lc-crl) 'koi8-r)
- (cons (list lc-ascii lc-arb) 'iso-8859-6)
- (cons (list lc-ascii lc-grk) 'iso-8859-7)
- (cons (list lc-ascii lc-hbw) 'iso-8859-8)
- (cons (list lc-ascii lc-ltn5) 'iso-8859-9)
- (cons (list lc-ascii lc-roman lc-jpold lc-jp) 'iso-2022-jp)
- (cons (list lc-ascii lc-kr) 'euc-kr)
- (cons (list lc-ascii lc-cn) 'gb2312)
- (cons (list lc-ascii lc-big5-1 lc-big5-2) 'big5)
- (cons (list lc-ascii lc-roman lc-ltn1 lc-grk
- lc-jpold lc-cn lc-jp lc-kr lc-jp2) 'iso-2022-jp-2)
- (cons (list lc-ascii lc-roman lc-ltn1 lc-grk
- lc-jpold lc-cn lc-jp lc-kr lc-jp2
- lc-cns1 lc-cns2) 'iso-2022-int-1)
- (cons (list lc-ascii lc-roman
- lc-ltn1 lc-ltn2 lc-crl lc-grk
- lc-jpold lc-cn lc-jp lc-kr lc-jp2
- lc-cns1 lc-cns2 lc-cns3 lc-cns4
- lc-cns5 lc-cns6 lc-cns7) 'iso-2022-int-1)
- ))
-
-(defvar default-mime-charset 'x-ctext)
+(defun encode-mime-charset-region (start end charset)
+ "Encode the text between START and END as MIME CHARSET."
+ (let ((cs (mime-charset-to-coding-system charset)))
+ (if cs
+ (code-convert start end *internal* cs)
+ )))
+
+(defun decode-mime-charset-region (start end charset)
+ "Decode the text between START and END as MIME CHARSET."
+ (let ((cs (mime-charset-to-coding-system charset)))
+ (if cs
+ (code-convert start end cs *internal*)
+ )))
+
+(defun encode-mime-charset-string (string charset)
+ "Encode the STRING as MIME CHARSET."
+ (let ((cs (mime-charset-to-coding-system charset)))
+ (if cs
+ (code-convert-string string *internal* cs)
+ string)))
+
+(defun decode-mime-charset-string (string charset)
+ "Decode the STRING which is encoded in MIME CHARSET."
+ (let ((cs (mime-charset-to-coding-system charset)))
+ (if cs
+ (decode-coding-string string cs)
+ string)))
+
+
+;;; @@ to coding-system
+;;;
(defvar mime-charset-coding-system-alist
'((iso-8859-1 . *ctext*)
(intern (concat (symbol-name cs) (symbol-name lbt)))
)))
-(defun detect-mime-charset-region (start end)
- "Return MIME charset for region between START and END.
-\[emu-mule.el]"
- (charsets-to-mime-charset
- (cons lc-ascii (find-charset-region start end))))
-(defun encode-mime-charset-region (start end charset)
- "Encode the text between START and END as MIME CHARSET.
-\[emu-mule.el]"
- (let ((cs (mime-charset-to-coding-system charset)))
- (if cs
- (code-convert start end *internal* cs)
- )))
+;;; @@ detection
+;;;
-(defun decode-mime-charset-region (start end charset)
- "Decode the text between START and END as MIME CHARSET.
-\[emu-mule.el]"
- (let ((cs (mime-charset-to-coding-system charset)))
- (if cs
- (code-convert start end cs *internal*)
- )))
+(defvar charsets-mime-charset-alist
+ (let ((alist
+ '(((lc-ascii) . 'us-ascii)
+ ((lc-ascii lc-ltn1) . 'iso-8859-1)
+ ((lc-ascii lc-ltn2) . 'iso-8859-2)
+ ((lc-ascii lc-ltn3) . 'iso-8859-3)
+ ((lc-ascii lc-ltn4) . 'iso-8859-4)
+;;; ((lc-ascii lc-crl) . 'iso-8859-5)
+ ((lc-ascii lc-crl) . 'koi8-r)
+ ((lc-ascii lc-arb) . 'iso-8859-6)
+ ((lc-ascii lc-grk) . 'iso-8859-7)
+ ((lc-ascii lc-hbw) . 'iso-8859-8)
+ ((lc-ascii lc-ltn5) . 'iso-8859-9)
+ ((lc-ascii lc-roman lc-jpold lc-jp) . 'iso-2022-jp)
+ ((lc-ascii lc-kr) . 'euc-kr)
+ ((lc-ascii lc-cn) . 'gb2312)
+ ((lc-ascii lc-big5-1 lc-big5-2) . 'big5)
+ ((lc-ascii lc-roman lc-ltn1 lc-grk
+ lc-jpold lc-cn lc-jp lc-kr
+ lc-jp2) . 'iso-2022-jp-2)
+ ((lc-ascii lc-roman lc-ltn1 lc-grk
+ lc-jpold lc-cn lc-jp lc-kr lc-jp2
+ lc-cns1 lc-cns2) . 'iso-2022-int-1)
+ ((lc-ascii lc-roman
+ lc-ltn1 lc-ltn2 lc-crl lc-grk
+ lc-jpold lc-cn lc-jp lc-kr lc-jp2
+ lc-cns1 lc-cns2 lc-cns3 lc-cns4
+ lc-cns5 lc-cns6 lc-cns7) . 'iso-2022-int-1)
+ ))
+ dest)
+ (while alist
+ (catch 'not-found
+ (let ((pair (car alist)))
+ (setq dest
+ (cons (mapcar (function
+ (lambda (cs)
+ (if (boundp cs)
+ (symbol-value cs)
+ (throw 'not-found nil)
+ )))
+ (car pair))
+ (cdr pair)))))
+ (setq alist (cdr alist))))
+ )
-(defun encode-mime-charset-string (string charset)
- "Encode the STRING as MIME CHARSET. [emu-mule.el]"
- (let ((cs (mime-charset-to-coding-system charset)))
- (if cs
- (code-convert-string string *internal* cs)
- string)))
+(defvar default-mime-charset 'x-ctext
+ "Default value of MIME-charset.
+It is used when MIME-charset is not specified.
+It must be symbol.")
-(defun decode-mime-charset-string (string charset)
- "Decode the STRING which is encoded in MIME CHARSET. [emu-mule.el]"
- (let ((cs (mime-charset-to-coding-system charset)))
- (if cs
- (decode-coding-string string cs)
- string)))
+(defun detect-mime-charset-region (start end)
+ "Return MIME charset for region between START and END."
+ (charsets-to-mime-charset
+ (cons lc-ascii (find-charset-region start end))))
;;; @ character
-;;; emu-x20.el --- emu API implementation for XEmacs 20 with mule
+;;; emu-x20.el --- emu API implementation for XEmacs with mule
;; Copyright (C) 1994,1995,1996,1997 MORIOKA Tomohiko
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Id: emu-x20.el,v 7.66 1997/08/30 07:09:21 morioka Exp $
+;; Version: $Id: emu-x20.el,v 7.68 1997/11/04 07:41:28 morioka Exp $
;; Keywords: emulation, compatibility, Mule, XEmacs
;; This file is part of XEmacs.
;;; @ MIME charset
;;;
+(defsubst encode-mime-charset-region (start end charset)
+ "Encode the text between START and END as MIME CHARSET."
+ (let ((cs (mime-charset-to-coding-system charset)))
+ (if cs
+ (encode-coding-region start end cs)
+ )))
+
+(defsubst decode-mime-charset-region (start end charset)
+ "Decode the text between START and END as MIME CHARSET."
+ (let ((cs (mime-charset-to-coding-system charset)))
+ (if cs
+ (decode-coding-region start end cs)
+ )))
+
+(defsubst encode-mime-charset-string (string charset)
+ "Encode the STRING as MIME CHARSET."
+ (let ((cs (mime-charset-to-coding-system charset)))
+ (if cs
+ (encode-coding-string string cs)
+ string)))
+
+(defsubst decode-mime-charset-string (string charset)
+ "Decode the STRING as MIME CHARSET."
+ (let ((cs (mime-charset-to-coding-system charset)))
+ (if cs
+ (decode-coding-string string cs)
+ string)))
+
+
(defvar charsets-mime-charset-alist
'(((ascii) . us-ascii)
((ascii latin-iso8859-1) . iso-8859-1)
((ascii latin-iso8859-2) . iso-8859-2)
((ascii latin-iso8859-3) . iso-8859-3)
((ascii latin-iso8859-4) . iso-8859-4)
-;;; ((ascii cyrillic-iso8859-5) . iso-8859-5)
- ((ascii cyrillic-iso8859-5) . koi8-r)
+ ((ascii cyrillic-iso8859-5) . iso-8859-5)
+;;; ((ascii cyrillic-iso8859-5) . koi8-r)
((ascii arabic-iso8859-6) . iso-8859-6)
((ascii greek-iso8859-7) . iso-8859-7)
((ascii hebrew-iso8859-8) . iso-8859-8)
;; Copyright (C) 1996,1997 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version:
-;; $Id: file-detect.el,v 3.4 1997/06/28 07:18:31 morioka Exp $
-;; Keywords: install, module
+;; Version: $Id: file-detect.el,v 4.1 1997/11/04 09:02:49 morioka Exp $
+;; Keywords: file detection, install, module
;; This file is part of APEL (A Portable Emacs Library).
;; Copyright (C) 1996 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Created: 1996/8/18
-;; Version: $Id: install.el,v 3.1 1996/11/26 19:55:55 shuhei-k Exp $
-;; Keywords: install
+;; Created: 1996/08/18
+;; Version: $Id: install.el,v 4.1 1997/11/04 09:05:22 morioka Exp $
+;; Keywords: install, byte-compile, directory detection
-;; This file is part of tl (Tiny Library).
+;; This file is part of APEL (A Portable Emacs Library).
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
(require 'emu)
(require 'file-detect)
+
;;; @ compile Emacs Lisp files
;;;