Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

APEL 4.1.

  • Loading branch information...
commit c2df6dcf2cdc808a63afaca0b8d330c25a9a980d 1 parent 816eaf6
morioka authored
View
42 ChangeLog
@@ -1,3 +1,45 @@
+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.
+
+
1997-09-26 MORIOKA Tomohiko <morioka@jaist.ac.jp>
* APEL: Version 3.4.4 was released.
View
4 Makefile
@@ -2,9 +2,9 @@
# $Id$
#
-VERSION = 3.4.4
+VERSION = 4.1
-TAR = gtar
+TAR = tar
RM = /bin/rm -f
CP = /bin/cp -p
View
80 emu-20.el
@@ -30,6 +30,9 @@
;;; Code:
+(require 'custom)
+
+
;;; @ binary access
;;;
@@ -108,38 +111,51 @@ used as line break code type of coding-system."
(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."
View
37 emu-e20.el
@@ -1,4 +1,4 @@
-;;; 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.
@@ -25,7 +25,7 @@
;;; Commentary:
-;; This module requires Emacs 20.0.90 or later.
+;; This module requires Emacs 20.1 or later.
;;; Code:
@@ -76,6 +76,39 @@ in the region between START and END."
;;; @ 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)
View
154 emu-mule.el
@@ -75,25 +75,25 @@
(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
@@ -158,36 +158,37 @@ find-file-hooks, etc.
;;; @ 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*)
@@ -215,41 +216,64 @@ find-file-hooks, etc.
(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
View
35 emu-x20.el
@@ -1,4 +1,4 @@
-;;; 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
@@ -36,14 +36,43 @@
;;; @ 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)
View
5 file-detect.el
@@ -3,9 +3,8 @@
;; Copyright (C) 1996,1997 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version:
-;; $Id$
-;; Keywords: install, module
+;; Version: $Id$
+;; Keywords: file detection, install, module
;; This file is part of APEL (A Portable Emacs Library).
View
7 install.el
@@ -3,11 +3,11 @@
;; Copyright (C) 1996 Free Software Foundation, Inc.
;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Created: 1996/8/18
+;; Created: 1996/08/18
;; Version: $Id$
-;; Keywords: install
+;; 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
@@ -29,6 +29,7 @@
(require 'emu)
(require 'file-detect)
+
;;; @ compile Emacs Lisp files
;;;
Please sign in to comment.
Something went wrong with that request. Please try again.