summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1997-05-28 03:39:03 +0000
committerKenichi Handa <handa@m17n.org>1997-05-28 03:39:03 +0000
commit335a7ad76828cbb6c802eb1f103002f61ec1ec0a (patch)
tree7fee13fb6eb167b7f250f1c3e6c43727586b4feb
parente4e6cfa0f0247d672b2a605dd2aed398571122f2 (diff)
downloademacs-335a7ad76828cbb6c802eb1f103002f61ec1ec0a.tar.gz
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.
-rw-r--r--lisp/language/china-util.el81
-rw-r--r--lisp/language/chinese.el109
-rw-r--r--lisp/language/cyrillic.el55
-rw-r--r--lisp/language/devan-util.el7
-rw-r--r--lisp/language/devanagari.el22
-rw-r--r--lisp/language/ethio-util.el36
-rw-r--r--lisp/language/ethiopic.el34
-rw-r--r--lisp/language/european.el163
-rw-r--r--lisp/language/greek.el14
-rw-r--r--lisp/language/hebrew.el17
-rw-r--r--lisp/language/indian.el17
-rw-r--r--lisp/language/japan-util.el31
-rw-r--r--lisp/language/japanese.el29
-rw-r--r--lisp/language/lao-util.el10
-rw-r--r--lisp/language/lao.el14
-rw-r--r--lisp/language/thai-util.el7
-rw-r--r--lisp/language/thai.el15
-rw-r--r--lisp/language/tibet-util.el16
-rw-r--r--lisp/language/tibetan.el11
-rw-r--r--lisp/language/viet-util.el5
-rw-r--r--lisp/language/vietnamese.el22
21 files changed, 406 insertions, 309 deletions
diff --git a/lisp/language/china-util.el b/lisp/language/china-util.el
index f1129408176..14661219878 100644
--- a/lisp/language/china-util.el
+++ b/lisp/language/china-util.el
@@ -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
diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el
index ab95c4f09c3..637253277aa 100644
--- a/lisp/language/chinese.el
+++ b/lisp/language/chinese.el
@@ -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 @@ Please specify/select one of them to get more information.")
(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 @@ Please specify/select one of them to get more information.")
(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 @@ Please specify/select one of them to get more information.")
(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
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el
index 737fefb39e9..e58fdd0db7f 100644
--- a/lisp/language/cyrillic.el
+++ b/lisp/language/cyrillic.el
@@ -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)
+(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))))
- (setq default-input-method '("Cyrillic" . "quail-yawerty"))
- )
+(set-language-info-alist
+ "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" '((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-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
diff --git a/lisp/language/devan-util.el b/lisp/language/devan-util.el
index d2cfdd36302..1ba694bbced 100644
--- a/lisp/language/devan-util.el
+++ b/lisp/language/devan-util.el
@@ -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
diff --git a/lisp/language/devanagari.el b/lisp/language/devanagari.el
index ada8a8f4821..80d341eea20 100644
--- a/lisp/language/devanagari.el
+++ b/lisp/language/devanagari.el
@@ -57,25 +57,15 @@ devanagari-compose-from-is13194-region
"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
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el
index 288a46ff0cf..e6e1186ee8a 100644
--- a/lisp/language/ethio-util.el
+++ b/lisp/language/ethio-util.el
@@ -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
;;
diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el
index fa99bf64a46..35b4f4d00e4 100644
--- a/lisp/language/ethiopic.el
+++ b/lisp/language/ethiopic.el
@@ -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))
diff --git a/lisp/language/european.el b/lisp/language/european.el
index 685c3d5caf0..75a118de163 100644
--- a/lisp/language/european.el
+++ b/lisp/language/european.el
@@ -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.
))
diff --git a/lisp/language/greek.el b/lisp/language/greek.el
index 5ff5a58dbe9..632ae24a8ae 100644
--- a/lisp/language/greek.el
+++ b/lisp/language/greek.el
@@ -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)
diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el
index 6e8ec265d10..c9aa5678411 100644
--- a/lisp/language/hebrew.el
+++ b/lisp/language/hebrew.el
@@ -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 @@ But, please note that right-to-left writing is not yet supported."
(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
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index 5e40dd28076..acdbf33bef4 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -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
diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el
index 6575fdd43b9..f99b9f09d73 100644
--- a/lisp/language/japan-util.el
+++ b/lisp/language/japan-util.el
@@ -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)
diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el
index de9ebe4f454..b089f02bd25 100644
--- a/lisp/language/japanese.el
+++ b/lisp/language/japanese.el
@@ -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")
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el
index df608d3d393..b10e341b353 100644
--- a/lisp/language/lao-util.el
+++ b/lisp/language/lao-util.el
@@ -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
diff --git a/lisp/language/lao.el b/lisp/language/lao.el
index 4bf542c82dd..39a19eb6d05 100644
--- a/lisp/language/lao.el
+++ b/lisp/language/lao.el
@@ -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))
diff --git a/lisp/language/thai-util.el b/lisp/language/thai-util.el
index 334f7e41386..9fef5b5591b 100644
--- a/lisp/language/thai-util.el
+++ b/lisp/language/thai-util.el
@@ -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
diff --git a/lisp/language/thai.el b/lisp/language/thai.el
index 425f68e2206..badf98aa534 100644
--- a/lisp/language/thai.el
+++ b/lisp/language/thai.el
@@ -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)
diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el
index 37a0f49493c..202cf52e29e 100644
--- a/lisp/language/tibet-util.el
+++ b/lisp/language/tibet-util.el
@@ -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 @@ See also docstring of the function tibetan-compose-region."
(provide 'language/tibet-util)
+;;; Local Variables:
+;;; generated-autoload-file: "../loaddefs.el"
+;;; End:
;;; language/tibet-util.el ends here.
diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el
index 5c4d621e68d..cfea18393ea 100644
--- a/lisp/language/tibetan.el
+++ b/lisp/language/tibetan.el
@@ -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))
diff --git a/lisp/language/viet-util.el b/lisp/language/viet-util.el
index 1da3de12a4a..9c665846556 100644
--- a/lisp/language/viet-util.el
+++ b/lisp/language/viet-util.el
@@ -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:
;; ------------+----------+--------
diff --git a/lisp/language/vietnamese.el b/lisp/language/vietnamese.el
index e00e13a3599..a8e1635ecd9 100644
--- a/lisp/language/vietnamese.el
+++ b/lisp/language/vietnamese.el
@@ -226,33 +226,15 @@ Both tables are indexed by the position code of Vietnamese characters.")
(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