changeset 17993:73869115ae0a

Most of setup-LANGUAGE-environment functions are moved form LANGUAGE.el to LANG-util.el. These functions now at first call setup-english-environment to reset various values to the defaults.
author Kenichi Handa <handa@m17n.org>
date Wed, 28 May 1997 03:39:03 +0000
parents 191bef5a0922
children 28d45a11ac18
files lisp/language/china-util.el lisp/language/chinese.el lisp/language/cyrillic.el lisp/language/devan-util.el lisp/language/devanagari.el lisp/language/ethio-util.el lisp/language/ethiopic.el lisp/language/european.el lisp/language/greek.el lisp/language/hebrew.el lisp/language/indian.el lisp/language/japan-util.el lisp/language/japanese.el lisp/language/lao-util.el lisp/language/lao.el lisp/language/thai-util.el lisp/language/thai.el lisp/language/tibet-util.el lisp/language/tibetan.el lisp/language/viet-util.el lisp/language/vietnamese.el
diffstat 21 files changed, 406 insertions(+), 309 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/language/china-util.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/china-util.el	Wed May 28 03:39:03 1997 +0000
@@ -24,6 +24,87 @@
 
 ;;; Code:
 
+;;;###autoload
+(defun setup-chinese-gb-environment ()
+  "Setup multilingual environment (MULE) for Chinese GB2312 users."
+  (interactive)
+  (setup-english-environment)
+
+  (setq primary-language "Chinese-GB")
+
+  (setq coding-category-iso-8-2 'cn-gb-2312)
+  (setq coding-category-iso-else 'iso-2022-cn)
+  (setq coding-category-big5 'cn-big5)
+
+  (set-coding-priority
+   '(coding-category-iso-7
+     coding-category-iso-else
+     coding-category-iso-8-2
+     coding-category-big5
+     coding-category-iso-8-1
+     coding-category-emacs-mule))
+
+  (setq-default buffer-file-coding-system 'cn-gb-2312)
+  (set-terminal-coding-system-internal 'cn-gb-2312)
+  (set-keyboard-coding-system-internal 'cn-gb-2312)
+  (setq sendmail-coding-system nil
+	rmail-file-coding-system 'iso-2022-cn)
+
+  (setq default-input-method '("Chinese-GB" . "quail-py")))
+
+;;;###autoload
+(defun setup-chinese-big5-environment ()
+  "Setup multilingual environment (MULE) for Chinese Big5 users."
+  (interactive)
+  (setup-english-environment)
+
+  (setq primary-language "Chinese-BIG5")
+
+  (setq coding-category-iso-8-2 'cn-big5)
+  (setq coding-category-iso-else 'iso-2022-cn)
+  (setq coding-category-big5 'cn-big5)
+
+  (set-coding-priority
+   '(coding-category-iso-7
+     coding-category-iso-else
+     coding-category-big5
+     coding-category-iso-8-2
+     coding-category-emacs-mule))
+
+  (setq-default buffer-file-coding-system 'cn-big5)
+  (set-terminal-coding-system-internal 'cn-big5)
+  (set-keyboard-coding-system-internal 'cn-big5)
+  (setq sendmail-coding-system nil
+	rmail-file-coding-system 'iso-2022-cn)
+
+  (setq default-input-method '("Chinese-BIG5" . "quail-py-b5")))
+
+;;;###autoload
+(defun setup-chinese-cns-environment ()
+  "Setup multilingual environment (MULE) for Chinese CNS11643 family users."
+  (interactive)
+  (setup-english-environment)
+
+  (setq primary-language "Chinese-CNS")
+
+  (setq coding-category-iso-else 'iso-2022-cn)
+  (setq coding-category-big5 'cn-big5)
+  (setq coding-category-iso-8-2 'cn-big5)
+
+  (set-coding-priority
+   '(coding-category-iso-7
+     coding-category-iso-else
+     coding-category-iso-8-2
+     coding-category-big5))
+
+  (setq-default buffer-file-coding-system 'iso-2022-cn)
+  (set-terminal-coding-system-internal 'iso-2022-cn)
+  (set-keyboard-coding-system-internal 'iso-2022-cn)
+  (setq sendmail-coding-system nil
+	rmail-file-coding-system 'iso-2022-cn)
+
+  (setq default-input-method '("Chinese-CNS" . "quail-quick-cns")))
+
 ;; Hz/ZW encoding stuffs
 
 ;; HZ is an encoding method for Chinese character set GB2312 used
--- a/lisp/language/chinese.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/chinese.el	Wed May 28 03:39:03 1997 +0000
@@ -46,15 +46,16 @@
 
 (define-coding-system-alias 'iso-2022-cn 'iso-2022-cn-ext)
 
-(set-language-info-alist
- "Chinese" '((documentation . "\
-Emacs provides the following three kinds of Chinese support:
-  Chinese-GB: for users of the charset GB2312
-  Chinese-BIG5: for users of the charset Big5
-  Chinese-CNS: for users of the charset CNS11643 family
-Please specify/select one of them to get more information.")
-	     ))
+(define-prefix-command 'describe-chinese-support-map)
+(define-key-after describe-language-support-map [Chinese]
+  '("Chinese" . describe-chinese-support-map)
+  t)
 
+(define-prefix-command 'setup-chinese-environment-map)
+(define-key-after setup-language-environment-map [Chinese]
+  '("Chinese" . setup-chinese-environment-map)
+  t)
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Chinese GB2312 (simplified) 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -108,37 +109,15 @@
 (register-input-method
  "Chinese-GB" '("quail-py" quail-use-package "quail/py"))
 
-(defun setup-chinese-gb-environment ()
-  "Setup multilingual environment (MULE) for Chinese GB2312 users."
-  (interactive)
-  (setq primary-language "Chinese-GB")
-
-  (setq coding-category-iso-8-2 'cn-gb-2312)
-  (setq coding-category-iso-else 'iso-2022-cn)
-  (setq coding-category-big5 'cn-big5)
-
-  (set-coding-priority
-   '(coding-category-iso-7
-     coding-category-iso-else
-     coding-category-iso-8-2
-     coding-category-big5
-     coding-category-iso-8-1
-     coding-category-emacs-mule
-     ))
-
-  (setq-default buffer-file-coding-system 'cn-gb-2312)
-  (set-terminal-coding-system 'cn-gb-2312)
-  (set-keyboard-coding-system 'cn-gb-2312)
-
-  (setq default-input-method '("Chinese-GB" . "quail-py"))
-  )
-
 (set-language-info-alist
- "Chinese-GB" '((setup-function . setup-chinese-gb-environment)
+ "Chinese-GB" '((setup-function . (setup-chinese-gb-environment
+				   . setup-chinese-environment-map))
 		(charset . (chinese-gb2312 chinese-sisheng))
 		(coding-system . (cn-gb-2312 hz-gb-2312 iso-2022-cn))
 		(sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B)	$ADc:C(B")
-		(documentation . t)))
+		(documentation . ("Support for Chinese GB2312 character set."
+				  . describe-chinese-support-map))
+		))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Chinese BIG5 (traditional)
@@ -189,34 +168,15 @@
 (register-input-method
  "Chinese-BIG5" '("quail-4corner" quail-use-package "quail/4corner"))
 
-(defun setup-chinese-big5-environment ()
-  "Setup multilingual environment (MULE) for Chinese Big5 users."
-  (interactive)
-  (setq primary-language "Chinese-BIG5")
-
-  (setq coding-category-big5 'cn-big5)
-  (setq coding-category-iso-else 'iso-2022-cn)
-  (setq coding-category-iso-8-2 'cn-gb-2312)
-
-  (set-coding-priority
-   '(coding-category-iso-7
-     coding-category-iso-else
-     coding-category-big5
-     coding-category-iso-8-2))
-
-  (setq-default buffer-file-coding-system 'cn-big5)
-  (set-terminal-coding-system 'cn-big5)
-  (set-keyboard-coding-system 'cn-big5)
-
-  (setq default-input-method '("Chinese-BIG5" . "quail-py-b5"))
-  )
-
 (set-language-info-alist
- "Chinese-BIG5" '((setup-function . setup-chinese-big5-environment)
+ "Chinese-BIG5" '((setup-function . (setup-chinese-big5-environment
+				     . setup-chinese-environment-map))
 		  (charset . (chinese-big5-1 chinese-big5-2))
 		  (coding-system . (cn-big5 iso-2022-cn))
 		  (sample-text . "Cantonese ($(0GnM$(B,$(0N]0*Hd(B)	$(0*/=((B, $(0+$)p(B")
-		  (documentation . t)))
+		  (documentation . ("Support for Chinese Big5 character set."
+				    . describe-chinese-support-map))
+		  ))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Chinese CNS11643 (traditional)
@@ -227,35 +187,16 @@
 (register-input-method
  "Chinese-CNS" '("quail-tsangchi-cns" quail-use-package "quail/tsangchi-cns"))
 
-(defun setup-chinese-cns-environment ()
-  "Setup multilingual environment (MULE) for Chinese CNS11643 family users."
-  (interactive)
-  (setq primary-language "Chinese-CNS")
-
-  (setq coding-category-iso-else 'iso-2022-cn)
-  (setq coding-category-big5 'cn-big5)
-  (setq coding-category-iso-8-2 'cn-gb-2312)
-
-  (set-coding-priority
-   '(coding-category-iso-7
-     coding-category-iso-else
-     coding-category-iso-8-2
-     coding-category-big5))
-
-  (setq-default buffer-file-coding-system 'iso-2022-cn)
-  (set-terminal-coding-system 'iso-2022-cn)
-  (set-keyboard-coding-system 'iso-2022-cn)
-
-  (setq default-input-method '("Chinese-CNS" . "quail-quick-cns"))
-  )
-
 (set-language-info-alist
- "Chinese-CNS" '((setup-function . setup-chinese-cns-environment)
+ "Chinese-CNS" '((setup-function . (setup-chinese-cns-environment
+				    . setup-chinese-environment-map))
 		 (charset . (chinese-cns11643-1 chinese-cns11643-2
 			     chinese-cns11643-3 chinese-cns11643-4
 			     chinese-cns11643-5 chinese-cns11643-6
 			     chinese-cns11643-7))
 		 (coding-system . (iso-2022-cn))
-		 (documentation . t)))
+		 (documentation . ("Support for Chinese CNS character sets."
+				   . describe-chinese-support-map))
+		 ))
 
 ;;; chinese.el ends here
--- a/lisp/language/cyrillic.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/cyrillic.el	Wed May 28 03:39:03 1997 +0000
@@ -29,6 +29,16 @@
 
 ;;; Code:
 
+(define-prefix-command 'describe-cyrillic-support-map)
+(define-key-after describe-language-support-map [Cyrillic]
+  '("Cyrillic" . describe-cyrillic-support-map)
+  t)
+
+(define-prefix-command 'setup-cyrillic-environment-map)
+(define-key-after setup-language-environment-map [Cyrillic]
+  '("Cyrillic" . setup-cyrillic-environment-map)
+  t)
+
 ;; ISO-8859-5 staff
 
 (make-coding-system
@@ -171,7 +181,7 @@
       (cons (cons "alternativnyj" ccl-encode-alternativnyj-font)
 	    font-ccl-encoder-alist))
 
-;;; GENERAL
+;;; For all Cyrillics.
 
 (register-input-method
  "Cyrillic" '("quail-jcuken" quail-use-package "quail/cyrillic"))
@@ -186,29 +196,30 @@
 (register-input-method
  "Cyrillic" '("quail-yawerty" quail-use-package "quail/cyrillic"))
 
-(defun setup-cyrillic-environment ()
-  "Setup multilingual environment for Cyrillic users."
-  (interactive)
-  (setq primary-language "Cyrillic")
-
-  (setq coding-category-iso-8-1 'iso-8859-5)
-
-  (set-coding-priority
-   '(coding-category-iso-7
-     coding-category-iso-8-1))
-
-  (setq-default buffer-file-coding-system 'iso-8859-5)
-  (set-terminal-coding-system 'iso-8859-5)
-  (set-keyboard-coding-system 'iso-8859-5)
-
-  (setq default-input-method '("Cyrillic" . "quail-yawerty"))
-  )
+(set-language-info-alist
+ "Cyrillic-ISO" '((setup-function . (setup-cyrillic-iso-environment
+				     . setup-cyrillic-environment-map))
+		  (charset . (cyrillic-iso8859-5))
+		  (coding-system . (iso-8859-5))
+		  (sample-text . "Russian (,L@caaZXY(B)	,L7T`PRabRcYbU(B!")
+		  (documentation . (t . describe-cyrillic-support-map))))
 
 (set-language-info-alist
- "Cyrillic" '((setup-function . setup-cyrillic-environment)
-	      (charset . (cyrillic-iso8859-5))
-	      (coding-system . (iso-8859-5 koi8 alternativnyj))
-	      (sample-text . "Russian (,L@caaZXY(B)	,L7T`PRabRcYbU(B!")
-	      (documentation . t)))
+ "Cyrillic-KOI8" '((setup-function . (setup-cyrillic-iso-environment
+				      . setup-cyrillic-environment-map))
+		   (charset . (cyrillic-iso8859-5))
+		   (coding-system . (koi8-4))
+		   (sample-text . "Russian (,L@caaZXY(B)	,L7T`PRabRcYbU(B!")
+		   (documentation . (t . describe-cyrillic-support-map))))
+
+(set-language-info-alist
+ "Cyrillic-ALTERNATIVNYJ" '((setup-function
+			     . (setup-cyrillic-iso-environment
+				. setup-cyrillic-environment-map))
+			    (charset . (cyrillic-iso8859-5))
+			    (coding-system . (alternativnyj))
+			    (sample-text . "Russian (,L@caaZXY(B)	,L7T`PRabRcYbU(B!")
+			    (documentation
+			     . (t . describe-cyrillic-support-map))))
 
 ;;; cyrillic.el ends here
--- a/lisp/language/devan-util.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/devan-util.el	Wed May 28 03:39:03 1997 +0000
@@ -44,6 +44,13 @@
 ;;; Intersection Function will be used.
 (require 'cl)
 
+;;;###autoload
+(defun setup-devanagari-environment ()
+  "Setup multilingual environment (MULE) for languages using Devanagari."
+  (interactive)
+  (setup-8-bit-environment nil 'in-is13194-devanagari
+			   '("Devanagari" . "quail-devanagari-itrans")))
+
 ;;; Basic functions.
 
 ;;;###autoload
--- a/lisp/language/devanagari.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/devanagari.el	Wed May 28 03:39:03 1997 +0000
@@ -57,25 +57,15 @@
  "Devanagari" '("quail-devanagari-hindi-transliteration" quail-use-package
 		"quail/devanagari"))
 
-(defun setup-devanagari-environment ()
-  "Setup multilingual environment (MULE) for languages using Devanagari."
-  (interactive)
-  (setq coding-category-iso-8-1 'in-is13194-devanagari)
-
-  (set-coding-priority
-   '(coding-category-iso-7
-     coding-category-iso-8-1))
-
-  (setq-default buffer-file-coding-system 'in-is13194-devanagari)
-
-  (setq default-input-method '("Devanagari" . "quail-devanagari-itrans"))
-  )
-
 (set-language-info-alist
- "Devanagari" '((setup-function . setup-devanagari-environment)
+ "Devanagari" '((setup-function . (setup-devanagari-environment
+				   . setup-indian-environment-map))
 		(charset . (indian-is13194 indian-2-column indian-1-column))
 		(coding-system . (in-is13194-devanagari))
-		(documentation . t)))
+		(documentation . ("\
+Such languages using Devanagari script as Hindi and Marathi
+are supported in this language environment."
+				  . describe-indian-support-map))))
 
 ;;
 ;; Devanagari Glyph List
--- a/lisp/language/ethio-util.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/ethio-util.el	Wed May 28 03:39:03 1997 +0000
@@ -26,6 +26,42 @@
 
 ;;; Code:
 
+;;;###autoload
+(defun setup-ethiopic-environment ()
+  "Setup multilingual environment for Ethiopic."
+  (interactive)
+  (setup-english-environment)
+  (setq primary-language "Ethiopic")
+
+  (setq default-input-method '("Ethiopic" . "quail-ethio"))
+
+  ;;
+  ;;  key bindings
+  ;;
+  (define-key global-map [f4] 'sera-to-fidel-buffer)
+  (define-key global-map [S-f4] 'sera-to-fidel-region)
+  (define-key global-map [C-f4] 'sera-to-fidel-marker)
+  (define-key global-map [f5] 'fidel-to-sera-buffer)
+  (define-key global-map [S-f5] 'fidel-to-sera-region)
+  (define-key global-map [C-f5] 'fidel-to-sera-marker)
+  (define-key global-map [f6] 'ethio-modify-vowel)
+  (define-key global-map [f7] 'ethio-replace-space)
+  (define-key global-map [f8] 'ethio-input-special-character)
+  (define-key global-map [S-f2] 'ethio-replace-space) ; as requested
+
+  (add-hook
+   'rmail-mode-hook
+   '(lambda ()
+      (define-key rmail-mode-map [C-f4] 'sera-to-fidel-mail)
+      (define-key rmail-mode-map [C-f5] 'fidel-to-sera-mail)))
+
+  (add-hook
+   'mail-mode-hook
+   '(lambda ()
+      (define-key mail-mode-map [C-f4] 'sera-to-fidel-mail)
+      (define-key mail-mode-map [C-f5] 'fidel-to-sera-mail)))
+  )
+
 ;;
 ;; ETHIOPIC UTILITY FUNCTIONS
 ;;
--- a/lisp/language/ethiopic.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/ethiopic.el	Wed May 28 03:39:03 1997 +0000
@@ -51,40 +51,6 @@
 (register-input-method
  "Ethiopic" '("quail-ethio" quail-use-package "quail/ethiopic"))
 
-(defun setup-ethiopic-environment ()
-  "Setup multilingual environment for Ethiopic."
-  (interactive)
-  (setq primary-language "Ethiopic")
-
-  (setq default-input-method '("Ethiopic" . "quail-ethio"))
-
-  ;;
-  ;;  key bindings
-  ;;
-  (define-key global-map [f4] 'sera-to-fidel-buffer)
-  (define-key global-map [S-f4] 'sera-to-fidel-region)
-  (define-key global-map [C-f4] 'sera-to-fidel-marker)
-  (define-key global-map [f5] 'fidel-to-sera-buffer)
-  (define-key global-map [S-f5] 'fidel-to-sera-region)
-  (define-key global-map [C-f5] 'fidel-to-sera-marker)
-  (define-key global-map [f6] 'ethio-modify-vowel)
-  (define-key global-map [f7] 'ethio-replace-space)
-  (define-key global-map [f8] 'ethio-input-special-character)
-  (define-key global-map [S-f2] 'ethio-replace-space) ; as requested
-
-  (add-hook
-   'rmail-mode-hook
-   '(lambda ()
-      (define-key rmail-mode-map [C-f4] 'sera-to-fidel-mail)
-      (define-key rmail-mode-map [C-f5] 'fidel-to-sera-mail)))
-
-  (add-hook
-   'mail-mode-hook
-   '(lambda ()
-      (define-key mail-mode-map [C-f4] 'sera-to-fidel-mail)
-      (define-key mail-mode-map [C-f5] 'fidel-to-sera-mail)))
-  )
-
 (set-language-info-alist
  "Ethiopic" '((setup-function . setup-ethiopic-environment)
 	      (charset . (ethiopic))
--- a/lisp/language/european.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/european.el	Wed May 28 03:39:03 1997 +0000
@@ -28,69 +28,172 @@
 
 ;;; Code:
 
+(define-prefix-command 'describe-european-support-map)
+(define-key-after describe-language-support-map [European]
+  '("European" . describe-european-support-map)
+  t)
+
+(define-prefix-command 'setup-european-environment-map)
+(define-key-after setup-language-environment-map [European]
+  '("European" . setup-european-environment-map)
+  t)
+
+;; Setup for a langauge which uses one-byte 8-bit CHARSET, one-byte
+;; 8-bit CODING-SYSTEM, and INPUT-METHOD.
+(defun setup-8-bit-environment (charset coding-system input-method)
+  (setup-english-environment)
+  (setq-default buffer-file-coding-system coding-system)
+  (setq coding-category-iso-8-1 coding-system
+	coding-category-iso-8-2 coding-system)
+  (set-terminal-coding-system-internal coding-system)
+  (set-keyboard-coding-system-internal coding-system)
+  (setq sendmail-coding-system nil
+	rmail-file-coding-system coding-system)
+
+  (if charset
+      (let ((nonascii-offset (make-char charset)))
+	(setq nonascii-insert-offset nonascii-offset
+	      set-case-syntax-offset nonascii-offset)))
+
+  (if input-method
+      (setq default-input-method input-method)))
+
+;; Latin1 (ISO-8859-1)
+
 (make-coding-system
  'iso-8859-1 2 ?X
- "Coding-system used in X as Compound Text Encoding."
+ "MIME ISO-8859-1 Compound Text Encoding."
  '((ascii t) (latin-iso8859-1 t) nil nil
    nil ascii-eol ascii-cntl))
 
 ;; CTEXT is an alias for ISO-8859-1
 (define-coding-system-alias 'iso-8859-1 'ctext)
 
+(register-input-method "Latin1"
+		       '("quail-latin-1" quail-use-package "quail/latin"))
+
+(defun setup-latin1-environment ()
+  "Setup multilingual environment (MULE) for European Latin1 users."
+  (interactive)
+  (setup-8-bit-environment 'latin-iso8859-1 'iso-8859-1
+			   '("Latin1" . "quail-latin-1")))
+
+(set-language-info-alist
+ "Latin1" '((setup-function . (setup-latin1-environment
+			       . setup-european-environment-map))
+	    (charset . (ascii latin-iso8859-1))
+	    (coding-system . (iso-8859-1))
+	    (sample-text
+	     . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!")
+	    (documentation . ("\
+The following languages is supported by Latin1 (ISO-8859-1) character set.
+" . describe-european-support-map))
+	    ))
+
+;; Latin2 (ISO-8859-2)
+
 (make-coding-system
  'iso-8859-2 2 ?2 "MIME ISO-8859-2"
  '((ascii t) (latin-iso8859-2 t) nil nil
    nil ascii-eol ascii-cntl nil nil nil nil))
 
+(register-input-method "Latin2"
+		       '("quail-latin-2" quail-use-package "quail/latin"))
+
+(defun setup-latin2-environment ()
+  "Setup multilingual environment (MULE) for European Latin2 users."
+  (interactive)
+  (setup-8-bit-environment 'latin-iso8859-2 'iso-8859-2
+			   '("Latin2" . "quail-latin-2")))
+
+(set-language-info-alist
+ "Latin2" '((setup-function . (setup-latin2-environment
+			       . setup-european-environment-map))
+	    (charset . (ascii latin-iso8859-2))
+	    (coding-system . (iso-8859-2))
+	    (documentation . ("\
+The following languages is supported by Latin2 (ISO-8859-2) character set.
+" . describe-european-support-map))
+	    ))
+
+;; Latin3 (ISO-8859-3)
+
 (make-coding-system
  'iso-8859-3 2 ?3 "MIME ISO-8859-3"
  '((ascii t) (latin-iso8859-3 t) nil nil
    nil ascii-eol ascii-cntl nil nil nil nil))
 
+(register-input-method "Latin3"
+		       '("quail-latin-3" quail-use-package "quail/latin"))
+
+(defun setup-latin3-environment ()
+  "Setup multilingual environment (MULE) for European Latin3 users."
+  (interactive)
+  (setup-8-bit-environment 'latin-iso8859-3 'iso-8859-3
+			   '("Latin3" . "quail-latin-3")))
+
+(set-language-info-alist
+ "Latin3" '((setup-function . (setup-latin3-environment
+			       . setup-european-environment-map))
+	    (charset . (ascii latin-iso8859-3))
+	    (coding-system . (iso-8859-3))
+	    (documentation . ("\
+The following languages is supported by Latin3 (ISO-8859-3) character set.
+" . describe-european-support-map))
+	    ))
+
+;; Latin4 (ISO-8859-4)
+
 (make-coding-system
  'iso-8859-4 2 ?4 "MIME ISO-8859-4"
  '((ascii t) (latin-iso8859-4 t) nil nil
    nil ascii-eol ascii-cntl nil nil nil nil))
 
+(register-input-method "European"
+		       '("quail-latin-4" quail-use-package "quail/latin"))
+
+(defun setup-latin4-environment ()
+  "Setup multilingual environment (MULE) for European Latin4 users."
+  (interactive)
+  (setup-8-bit-environment 'latin-iso8859-4 'iso-8859-4
+			   '("Latin4" . "quail-latin-4")))
+
+(set-language-info-alist
+ "Latin4" '((setup-function . (setup-latin4-environment
+			       . setup-european-environment-map))
+	    (charset . (ascii latin-iso8859-1))
+	    (coding-system . (iso-8859-4))
+	    (documentation . ("\
+The following languages is supported by Latin4 (ISO-8859-4) character set.
+" . describe-european-support-map))
+	    ))
+
+;; Latin4 (ISO-8859-9)
+
 (make-coding-system
  'iso-8859-9 2 ?9 "MIME ISO-8859-9"
  '((ascii t) (latin-iso8859-9 t) nil nil
    nil ascii-eol ascii-cntl nil nil nil nil))
 
 (register-input-method "European"
-		       '("quail-latin-1" quail-use-package "quail/latin"))
-(register-input-method "European"
-		       '("quail-latin-2" quail-use-package "quail/latin"))
-(register-input-method "European"
-		       '("quail-latin-3" quail-use-package "quail/latin"))
-(register-input-method "European"
-		       '("quail-latin-4" quail-use-package "quail/latin"))
-(register-input-method "European"
 		       '("quail-latin-5" quail-use-package "quail/latin"))
 
-(defun setup-european-environment ()
-  "Setup multilingual environment (MULE) for European languages users.
-It actually reset MULE to the default status, and
-set quail-latin-1 as the default input method to be selected.
-See also the documentation of setup-english-environment."
-  (setup-english-environment)
-  (setq default-input-method '("European" . "quail-latin-1")))
+(defun setup-latin5-environment ()
+  "Setup multilingual environment (MULE) for European Latin5 users."
+  (interactive)
+  (setup-8-bit-environment 'latin-iso8859-9 'iso-8859-9
+			   '("Latin5" . "quail-latin-5")))
 
 (set-language-info-alist
- "European" '((setup-function . setup-european-environment)
-	      (charset . (ascii latin-iso8859-1 latin-iso8859-2
-			  latin-iso8859-3 latin-iso8859-4 latin-iso8859-9))
-	      (coding-system . (iso-8859-1 iso-8859-2 iso-8859-3
-				iso-8859-4 iso-8859-9))
-	      (sample-text
-	       . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!")
-	      (documentation . ("\
-Almost all of European languages are supported by the character sets and
-coding systems listed below.
-To input them, LEIM (Libraries for Emacs Input Methods) should have been
-installed."))
-	      ))
-
+ "Latin5" '((setup-function . (setup-latin5-environment
+			       . setup-european-environment-map))
+	    (charset . (ascii latin-iso8859-9))
+	    (coding-system . (iso-8859-9))
+	    (documentation . ("\
+The following languages is supported by Latin5 (ISO-8859-9) character set.
+" . describe-european-support-map))
+	    ))
+
 (let ((languages '("French" "German" "Spanish" "Italian"
 		   ;; We have to list much more European languages here.
 		   ))
--- a/lisp/language/greek.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/greek.el	Wed May 28 03:39:03 1997 +0000
@@ -39,18 +39,8 @@
 (defun setup-greek-environment ()
   "Setup multilingual environment (MULE) for Greek."
   (interactive)
-  (setq coding-category-iso-8-1 'iso-8859-7)
-
-  (set-coding-priority
-   '(coding-category-iso-7
-     coding-category-iso-8-1))
-
-  (setq-default buffer-file-coding-system 'iso-8859-7)
-  (set-terminal-coding-system 'iso-8859-7)
-  (set-keyboard-coding-system 'iso-8859-7)
-
-  (setq default-input-method '("Greek" . "quail-greek"))
-  )
+  (setup-8-bit-environment 'greek-iso8859-7 'iso-8859-7
+			   '("Greek" . "quail-greek")))
 
 (set-language-info-alist
  "Greek" '((setup-function . setup-greek-environment)
--- a/lisp/language/hebrew.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/hebrew.el	Wed May 28 03:39:03 1997 +0000
@@ -40,19 +40,8 @@
   "Setup multilingual environment (MULE) for Hebrew.
 But, please note that right-to-left writing is not yet supported."
   (interactive)
-  (setq coding-category-iso-8-1 'iso-8859-8)
-
-  (set-coding-priority
-   '(coding-category-iso-7
-     coding-category-iso-8-1
-     coding-category-iso-8-2))
-
-  (setq-default buffer-file-coding-system 'iso-8859-8)
-  (set-terminal-coding-system 'iso-8859-8)
-  (set-keyboard-coding-system 'iso-8859-8)
-
-  (setq default-input-method '("Hebrew" . "quail-hebrew"))
-  )
+  (setup-8-bit-environment 'hebrew-iso8859-8 'iso-8859-8
+			   '("Hebrew" . "quail-hebrew")))
 
 (set-language-info-alist
  "Hebrew" '((setup-function . setup-hebrew-environment)
@@ -60,7 +49,7 @@
 	    (charset . (hebrew-iso8859-8))
 	    (coding-system . (iso-8859-8))
 	    (sample-text . "Hebrew	,Hylem(B")
-	    (documentation . ("Right-to-left writing is not yet supported."))
+	    (documentation . "Right-to-left writing is not yet supported.")
 	    ))
 
 ;;; hebew.el ends here
--- a/lisp/language/indian.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/indian.el	Wed May 28 03:39:03 1997 +0000
@@ -51,14 +51,15 @@
 
 ;;; Code:
 
-(set-language-info-alist
- "Indian" '((describe-function . describe-indian-support)
-	    (charset . (indian-is13194))
-	    (documentation . ("\
-Among Indian languages, such languages using Devanagari scripts as
-Hindi and Marathi are supproted.  For them, please specify Devanagari
-for more detail."))
-	    ))
+(define-prefix-command 'describe-indian-support-map)
+(define-key-after describe-language-support-map [Indian]
+  '("Indian" . describe-indian-support-map)
+  t)
+
+(define-prefix-command 'setup-indian-environment-map)
+(define-key-after setup-language-environment-map [Indian]
+  '("Indian" . setup-indian-environment-map)
+  t)
 
 ;;  Followings are what you see when you refer to the Emacs
 ;;  representations of IS 13194 charcters.  However, this is merely
--- a/lisp/language/japan-util.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/japan-util.el	Wed May 28 03:39:03 1997 +0000
@@ -24,6 +24,37 @@
 
 ;;; Code:
 
+;;;###autoload
+(defun setup-japanese-environment ()
+  "Setup multilingual environment (MULE) for Japanese."
+  (interactive)
+  (setup-english-environment)
+  (setq coding-category-iso-8-2 'euc-japan-1990)
+
+  (set-coding-priority
+   '(coding-category-iso-7
+     coding-category-iso-8-2
+     coding-category-sjis
+     coding-category-iso-8-1
+     coding-category-iso-else
+     coding-category-emacs-mule))
+
+  (if (eq system-type 'ms-dos)
+      (progn
+	(setq-default buffer-file-coding-system 'sjis)
+	(set-terminal-coding-system-internal 'sjis)
+	(set-keyboard-coding-system-internal 'sjis)
+	(setq default-process-coding-system '(sjis-dos . sjis-dos)))
+    (setq-default buffer-file-coding-system 'iso-2022-jp)
+    (set-terminal-coding-system-internal 'iso-2022-jp)
+    (set-keyboard-coding-system-internal 'iso-2022-jp))
+
+  (set-default-input-method "Japanese" "quail-ja")
+
+  (setq sendmail-coding-system 'iso-2022-jp
+	rmail-file-coding-system 'iso-2022-jp)
+  )
+
 (defconst japanese-kana-table
   '((?$B$"(B ?$B%"(B ?(I1(B) (?$B$$(B ?$B%$(B ?(I2(B) (?$B$&(B ?$B%&(B ?(I3(B) (?$B$((B ?$B%((B ?(I4(B) (?$B$*(B ?$B%*(B ?(I5(B)
     (?$B$+(B ?$B%+(B ?(I6(B) (?$B$-(B ?$B%-(B ?(I7(B) (?$B$/(B ?$B%/(B ?(I8(B) (?$B$1(B ?$B%1(B ?(I9(B) (?$B$3(B ?$B%3(B ?(I:(B)
--- a/lisp/language/japanese.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/japanese.el	Wed May 28 03:39:03 1997 +0000
@@ -59,35 +59,6 @@
 (register-input-method
  "Japanese" '("quail-ja" quail-use-package "quail/japanese"))
 
-(defun setup-japanese-environment ()
-  "Setup multilingual environment (MULE) for Japanese."
-  (interactive)
-  (setq coding-category-iso-8-2 'euc-japan-1990)
-
-  (set-coding-priority
-   '(coding-category-iso-7
-     coding-category-iso-8-2
-     coding-category-sjis
-     coding-category-iso-8-1
-     coding-category-iso-else
-     coding-category-emacs-mule))
-
-  (if (eq system-type 'ms-dos)
-      (progn
-	(setq-default buffer-file-coding-system 'sjis)
-	(set-terminal-coding-system 'sjis)
-	(set-keyboard-coding-system 'sjis)
-	(setq default-process-coding-system '(sjis-dos . sjis-dos)))
-    (setq-default buffer-file-coding-system 'iso-2022-jp)
-    (set-terminal-coding-system 'iso-2022-jp)
-    (set-keyboard-coding-system 'iso-2022-jp))
-
-  (set-default-input-method "Japanese" "quail-ja")
-
-  (setq sendmail-coding-system 'iso-2022-jp
-	rmail-file-coding-system 'iso-2022-jp)
-  )
-
 (set-language-info-alist
  "Japanese" '((setup-function . setup-japanese-environment)
 	      (tutorial . "TUTORIAL.jp")
--- a/lisp/language/lao-util.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/lao-util.el	Wed May 28 03:39:03 1997 +0000
@@ -24,6 +24,13 @@
 
 ;;; Code:
 
+;;;###autoload
+(defun setup-lao-environment ()
+  "Setup multilingual environment (MULE) for Lao."
+  (interactive)
+  (setup-8-bit-environment 'lao 'iso-2022-7
+			   '("Lao" . "quail-lao")))
+
 (let ((l '((?(1!(B consonant "LETTER KOR  KAI'" "CHICKEN")
 	   (?(1"(B consonant "LETTER KHOR KHAI'" "EGG")
 	   (?(1#(B invalid nil)
@@ -130,4 +137,7 @@
 ;;
 (provide 'language/lao-util)
 
+;;; Local Variables:
+;;; generated-autoload-file: "../loaddefs.el"
+;;; End:
 ;;; lao-util.el ends here
--- a/lisp/language/lao.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/lao.el	Wed May 28 03:39:03 1997 +0000
@@ -36,20 +36,6 @@
 (register-input-method
  "Lao" '("quail-lrt" quail-use-package "quail/lrt"))
 
-(defun setup-lao-environment ()
-  "Setup multilingual environment (MULE) for Lao."
-  (interactive)
-  (setup-english-environment)
-  (setq coding-category-iso-8-1 'lao)
-
-  (set-coding-priority
-   '(coding-category-iso-7
-     coding-category-iso-8-1))
-
-  (set-default buffer-file-coding-system 'iso-2022-7)
-
-  (setq default-input-method '("Lao" . "quail-lao")))
-
 (set-language-info-alist
  "Lao" '((setup-function . setup-lao-environment)
 	 (charset . (lao))
--- a/lisp/language/thai-util.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/thai-util.el	Wed May 28 03:39:03 1997 +0000
@@ -24,6 +24,13 @@
 
 ;;; Code:
 
+;;;autoload
+(defun setup-thai-environment ()
+  "Setup multilingual environment (MULE) for Thai."
+  (interactive)
+  (setup-8-bit-environment 'thai-tis620 'th-tis620
+			   '("Thai" . "quail-thai")))
+
 ;; Setting information of Thai characters.
 
 (let ((l '((?,T!(B consonant "LETTER KO KAI")				; 0xA1
--- a/lisp/language/thai.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/thai.el	Wed May 28 03:39:03 1997 +0000
@@ -41,21 +41,6 @@
 (register-input-method
  "Thai" '("quail-thai" quail-use-package "quail/thai"))
 
-(defun setup-thai-environment ()
-  "Setup multilingual environment (MULE) for Thai."
-  (interactive)
-  (setup-english-environment)
-  (setq coding-category-iso-8-1 'th-tis620)
-
-  (set-coding-priority
-   '(coding-category-iso-7
-     coding-category-iso-8-1))
-
-  (setq-default buffer-file-coding-system 'th-tis620)
-
-  (setq default-input-method '("Thai" . "quail-thai"))
-  )
-
 (set-language-info-alist
  "Thai" '((tutorial . "TUTORIAL.th")
 	  (setup-function . setup-thai-environment)
--- a/lisp/language/tibet-util.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/tibet-util.el	Wed May 28 03:39:03 1997 +0000
@@ -32,6 +32,19 @@
 
 ;;; Code:
 
+;;;###autoload
+(defun setup-tibetan-environment ()
+  (interactive)
+  (setup-english-environment)
+  (setq coding-category-iso-8-2 'tibetan)
+
+  (setq-default buffer-file-coding-system 'iso-2022-7)
+
+  (setq default-input-method '("Tibetan" . "quail-tibetan-wylie"))
+
+  (setq sendmail-coding-system 'iso-2022-7
+	rmail-file-coding-system 'iso-2022-7))
+
 ;;; This function makes a transcription string for
 ;;; re-composing a character.
 
@@ -454,4 +467,7 @@
 
 (provide 'language/tibet-util)
 
+;;; Local Variables:
+;;; generated-autoload-file: "../loaddefs.el"
+;;; End:
 ;;; language/tibet-util.el ends here.
--- a/lisp/language/tibetan.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/tibetan.el	Wed May 28 03:39:03 1997 +0000
@@ -102,17 +102,6 @@
 (register-input-method
  "Tibetan" '("quail-tibetan-tibkey" quail-use-package "quail/tibetan"))
 
-(defun setup-tibetan-environment ()
-  (setq coding-category-iso-7 'tibetan)
-
-  (set-coding-priority
-   '(coding-category-iso-7
-     coding-category-iso-8-1))
-
-  (setq-default buffer-file-coding-system 'iso-2022-7)
-
-  (setq default-input-method '("Tibetan" . "quail-tibetan-wylie")))
-
 (set-language-info-alist
  "Tibetan" '((setup-function . setup-tibetan-environment)
 	     (charset . (tibetan tibetan-1-column))
--- a/lisp/language/viet-util.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/viet-util.el	Wed May 28 03:39:03 1997 +0000
@@ -35,6 +35,11 @@
 
 ;;; Code:
 
+(defun setup-vietnamese-environment ()
+  "Setup multilingual environment (MULE) for Vietnamese."
+  (interactive)
+  (setup-8-bit-environment nil 'viscii  '("Vietnamese" . "quail-viqr")))
+
 ;; VIQR is a menmonic encoding specification for Vietnamese.
 ;; It represents diacritical marks by ASCII characters as follows:
 ;; ------------+----------+--------
--- a/lisp/language/vietnamese.el	Wed May 28 03:37:33 1997 +0000
+++ b/lisp/language/vietnamese.el	Wed May 28 03:39:03 1997 +0000
@@ -226,33 +226,15 @@
 (register-input-method
  "Vietnamese" '("quail-viqr" quail-use-package "quail/viqr"))
 
-(defun setup-vietnamese-environment ()
-  "Setup multilingual environment (MULE) for Vietnamese."
-  (interactive)
-  ;; for VISCII users
-  (setq coding-category-binary 'viscii)
-
-  ;; for VSCII users
-  ;; (setq coding-category-binary 'vscii)
-
-  (set-coding-priority
-   '(coding-category-iso-7
-     coding-category-binary))
-
-  (setq-default buffer-file-coding-system 'viscii)
-
-  (setq default-input-method '("Vietnamese" . "quail-viqr"))
-  )
-
 (set-language-info-alist
  "Vietnamese" '((setup-function . setup-vietnamese-environment)
 		(charset . (vietnamese-viscii-lower
 			    vietnamese-viscii-upper))
 		(coding-system . (viscii vscii viqr))
 		(sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt)	Ch,1`(Bo b,1U(Bn")
-		(documentation . '("\
+		(documentation . "\
 For Vietnamese, Emacs uses special charasets internally.
-They can be decoded from and encoded to VISCC, VSCII, and VIQR."))
+They can be decoded from and encoded to VISCC, VSCII, and VIQR.")
 		))
 
 ;;; vietnamese.el ends here