Permalink
Browse files

APEL 4.1.

  • Loading branch information...
1 parent 816eaf6 commit c2df6dcf2cdc808a63afaca0b8d330c25a9a980d morioka committed Mar 11, 1998
Showing with 254 additions and 110 deletions.
  1. +42 −0 ChangeLog
  2. +2 −2 Makefile
  3. +48 −32 emu-20.el
  4. +35 −2 emu-e20.el
  5. +89 −65 emu-mule.el
  6. +32 −3 emu-x20.el
  7. +2 −3 file-detect.el
  8. +4 −3 install.el
View
@@ -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
@@ -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
@@ -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
@@ -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)
Oops, something went wrong.

0 comments on commit c2df6dc

Please sign in to comment.