]> git.eshelyaron.com Git - emacs.git/commitdiff
Most of setup-LANGUAGE-environment functions are
authorKenichi Handa <handa@m17n.org>
Wed, 28 May 1997 03:39:03 +0000 (03:39 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 28 May 1997 03:39:03 +0000 (03:39 +0000)
moved form LANGUAGE.el to LANG-util.el.  These functions now at
first call setup-english-environment to reset various values to
the defaults.

21 files changed:
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

index f1129408176cbb435f814ffaf7e648b2c92eb163..14661219878d7f30951f4fdd0631183bd6e97338 100644 (file)
 
 ;;; 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
index ab95c4f09c3732f95f2456ad5b3dd02044c7ae96..637253277aa1c72a91757db47db6eabf99d1bb11 100644 (file)
 
 (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)
+\f
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; 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 (\e$AVPND\e(B,\e$AFUM(;0\e(B,\e$A::So\e(B)    \e$ADc:C\e(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 (\e$(0GnM$\e(B,\e$(0N]0*Hd\e(B) \e$(0*/=(\e(B, \e$(0+$)p\e(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
index 737fefb39e98082b07088d30012cc3dd61a465c3..e58fdd0db7ff9222353152c00e8c58d198db9305 100644 (file)
 
 ;;; 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
       (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"))
 (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 (\e,L@caaZXY\e(B)       \e,L7T`PRabRcYbU\e(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 (\e,L@caaZXY\e(B)      \e,L7T`PRabRcYbU\e(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 (\e,L@caaZXY\e(B)   \e,L7T`PRabRcYbU\e(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 (\e,L@caaZXY\e(B)     \e,L7T`PRabRcYbU\e(B!")
+                           (documentation
+                            . (t . describe-cyrillic-support-map))))
 
 ;;; cyrillic.el ends here
index d2cfdd363022bf4af0b42b736054e8cee593d41f..1ba694bbced8c9e2e6700363bc75e934b60bb983 100644 (file)
 ;;; 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
index ada8a8f4821513943d45cea8b260ffa600717492..80d341eea202c92f95515fecc3aa7a01aa8cd0d8 100644 (file)
@@ -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
index 288a46ff0cf61913756dca44848ea64c8403b945..e6e1186ee8ab329ee8935156645b5552e4fc3388 100644 (file)
 
 ;;; 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
 ;;
index fa99bf64a46ca8c0ed3c121548ed3102a1182787..35b4f4d00e48ff236e76513aeaba233cc4af2c11 100644 (file)
 (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))
index 685c3d5caf0dd173f939d12c6609a6a1c2342282..75a118de16398200c820cdbc42d1bf1aed60aceb 100644 (file)
 
 ;;; 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)))
+\f
+;; 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\e,A|_\e(B Gott, Ciao, \e,A!\e(BHola!")
+           (documentation . ("\
+The following languages is supported by Latin1 (ISO-8859-1) character set.
+" . describe-european-support-map))
+           ))
+\f
+;; 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))
+           ))
+\f
+;; 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))
+           ))
+\f
+;; 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))
+           ))
+\f
+;; 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\e,A|_\e(B Gott, Ciao, \e,A!\e(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))
+           ))
+\f
 (let ((languages '("French" "German" "Spanish" "Italian"
                   ;; We have to list much more European languages here.
                   ))
index 5ff5a58dbe90b1067935e818b881e95a265c9be9..632ae24a8aea824697a4b3b26b3dd9cd6a81e3d2 100644 (file)
 (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)
index 6e8ec265d1000aaab43096c6b7bc51bf4fd0aa7c..c9aa567841166e88f4557cc5fb76a3c35b718536 100644 (file)
   "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      \e,Hylem\e(B")
-           (documentation . ("Right-to-left writing is not yet supported."))
+           (documentation . "Right-to-left writing is not yet supported.")
            ))
 
 ;;; hebew.el ends here
index 5e40dd28076a6246ea51e69ca5302a327649ed4e..acdbf33bef4fa195d757fc52b2b55937ef63dc30 100644 (file)
 
 ;;; 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
index 6575fdd43b97734d18f98eec03a35e2483061866..f99b9f09d73a41ffa5302c6a7cc3db4cd4b573e2 100644 (file)
 
 ;;; 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
   '((?\e$B$"\e(B ?\e$B%"\e(B ?\e(I1\e(B) (?\e$B$$\e(B ?\e$B%$\e(B ?\e(I2\e(B) (?\e$B$&\e(B ?\e$B%&\e(B ?\e(I3\e(B) (?\e$B$(\e(B ?\e$B%(\e(B ?\e(I4\e(B) (?\e$B$*\e(B ?\e$B%*\e(B ?\e(I5\e(B)
     (?\e$B$+\e(B ?\e$B%+\e(B ?\e(I6\e(B) (?\e$B$-\e(B ?\e$B%-\e(B ?\e(I7\e(B) (?\e$B$/\e(B ?\e$B%/\e(B ?\e(I8\e(B) (?\e$B$1\e(B ?\e$B%1\e(B ?\e(I9\e(B) (?\e$B$3\e(B ?\e$B%3\e(B ?\e(I:\e(B)
index de9ebe4f4541ca7e1c65edd518769314f21329d2..b089f02bd2557b5f35e091c4eec2a1a873b2894d 100644 (file)
 (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")
index df608d3d393c5f3df0b504aaae757709b03fec93..b10e341b353b5aff731d8362259ec444806122ae 100644 (file)
 
 ;;; 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 '((?\e(1!\e(B consonant "LETTER KOR  KAI'" "CHICKEN")
           (?\e(1"\e(B consonant "LETTER KHOR KHAI'" "EGG")
           (?\e(1#\e(B invalid nil)
 ;;
 (provide 'language/lao-util)
 
+;;; Local Variables:
+;;; generated-autoload-file: "../loaddefs.el"
+;;; End:
 ;;; lao-util.el ends here
index 4bf542c82dd67b879a7dc5e3a4fb3aecb770d331..39a19eb6d0599c8b4b594ba41ad5f3b88d7053eb 100644 (file)
 (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))
index 334f7e41386418d24b4b03344ac8a1e199abc0b9..9fef5b5591bc03edd3b5bb6e5dfec2f7b19f33c2 100644 (file)
 
 ;;; 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 '((?\e,T!\e(B consonant "LETTER KO KAI")                                ; 0xA1
index 425f68e220629a996215996948911a62f66e4e5f..badf98aa5347bff04b967d8cf6f5b376d78b8236 100644 (file)
 (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)
index 37a0f49493cbf9592c7546a70d5aa91b3243896e..202cf52e29e4e24fe33a14b8cf000a82dfea880f 100644 (file)
 
 ;;; 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.
index 5c4d621e68dd43050a1bc088fc14ae621cfb46ac..cfea18393eab80fe8478fa4d23c46ed4890625f0 100644 (file)
 (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))
index 1da3de12a4afee2ef180d3998eb7f9fe719a5698..9c66584655697297345c012636f0a28df3855221 100644 (file)
 
 ;;; 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:
 ;; ------------+----------+--------
index e00e13a35996f752cb57c59a4f4512f563a5c5af..a8e1635ecd90b0789d00a48142eeab7243a78c93 100644 (file)
@@ -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\e,1*\e(Bng Vi\e,1.\e(Bt)     Ch\e,1`\e(Bo b\e,1U\e(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