(default-coded-charset-priority-list): Delete `ucs'.
[chise/xemacs-chise.git-] / lisp / mule / mule-cmds.el
index 20cd3b5..1e2a329 100644 (file)
 (define-key mule-keymap "r" 'toggle-display-direction)  ; XEmacs
 (define-key mule-keymap "l" 'set-language-environment)
 
-(define-key help-map "\C-L" 'describe-language-support)
 (define-key help-map "L" 'describe-language-environment)
 (define-key help-map "\C-\\" 'describe-input-method)
 (define-key help-map "I" 'describe-input-method)
-(define-key help-map "C" 'describe-coding-system)
 (define-key help-map "h" 'view-hello-file)
 
 ;; Menu for XEmacs were moved to menubar-items.el.
@@ -164,15 +162,19 @@ This sets the following coding systems:
   ;; that they could reset the terminal coding system.
   ;; (unless (and (eq window-system 'pc) coding-system)
   ;;   (setq default-terminal-coding-system coding-system))
-  (setq terminal-coding-system coding-system)
+  (set-terminal-coding-system coding-system)
   ;;(setq default-keyboard-coding-system coding-system)
-  (setq keyboard-coding-system coding-system)
+  (set-keyboard-coding-system coding-system)
   ;;(setq default-process-coding-system (cons coding-system coding-system))
+  ;; Refer to coding-system-for-read and coding-system-for-write
+  ;; so that C-x RET c works.
   (add-hook 'comint-exec-hook
            `(lambda ()
               (let ((proc (get-buffer-process (current-buffer))))
-                (set-process-input-coding-system  proc ',coding-system)
-                (set-process-output-coding-system proc ',coding-system)))
+                (set-process-input-coding-system
+                 proc (or coding-system-for-read ',coding-system))
+                (set-process-output-coding-system
+                 proc (or coding-system-for-write ',coding-system))))
            'append)
   (setq file-name-coding-system coding-system))
 
@@ -609,7 +611,8 @@ ALIST is an alist of KEY and INFO values.  See the documentation of
          (eval-after-load
              "menubar-items.elc"
            `(add-menu-button
-             '("Mule" "Describe Language Support")
+             '("%_Edit" "%_Multilingual (\"Mule\")"
+               "%_Describe Language Support")
              (vector ,lang-env
                      '(describe-language-environment ,lang-env)
                      t))))
@@ -620,11 +623,12 @@ ALIST is an alist of KEY and INFO values.  See the documentation of
       (eval-after-load
          "menubar-items.elc"
        `(add-menu-button
-         '("Mule" "Set Language Environment")
+         '("%_Edit" "%_Multilingual (\"Mule\")"
+           "%_Set Language Environment")
          (vector ,lang-env
                  '(set-language-environment ,lang-env)
                  t))))
-
+    
     (while alist
       (set-language-info lang-env (car (car alist)) (cdr (car alist)))
       (setq alist (cdr alist)))))
@@ -787,6 +791,8 @@ The return value is a string."
         (input-method (completing-read prompt input-method-alist
                                        nil t nil 'input-method-history
                                        default)))
+    (if (and input-method (symbolp input-method))
+       (setq input-method (symbol-name input-method)))
     (if (> (length input-method) 0)
        input-method
       (if inhibit-null
@@ -1084,19 +1090,34 @@ The default status is as follows:
   (set-coding-category-system 'shift-jis       'shift_jis)
   (set-coding-category-system 'big5            'big5)
   (cond ((eq (coding-system-type (coding-category-system 'utf-8)) 'utf-8)
-        (set-coding-category-system 'ucs-4 'iso-10646-ucs-4)
         (set-coding-category-system 'utf-8 'utf-8)
-        (set-coding-priority-list
-         '(iso-8-1
-           iso-8-2
-           iso-7
-           iso-lock-shift
-           iso-8-designate
-           utf-8
-           ucs-4
-           no-conversion
-           shift-jis
-           big5))
+        (cond ((eq (coding-system-type (coding-category-system 'ucs-4))
+                   'iso-10646-ucs-4)
+               (set-coding-category-system 'ucs-4 'iso-10646-ucs-4)
+               (set-coding-priority-list
+                '(iso-8-1
+                  iso-8-2
+                  iso-7
+                  iso-lock-shift
+                  iso-8-designate
+                  utf-8
+                  ucs-4
+                  no-conversion
+                  shift-jis
+                  big5))
+               )
+              (t
+               (set-coding-priority-list
+                '(iso-8-1
+                  iso-8-2
+                  iso-7
+                  iso-lock-shift
+                  iso-8-designate
+                  utf-8
+                  no-conversion
+                  shift-jis
+                  big5))
+               ))
         )
        (t
         (set-coding-priority-list
@@ -1433,7 +1454,7 @@ It can be retrieved with `(get-char-code-property CHAR PROPNAME)'."
 ;;               (memq (char-charset char) safe-charsets))
 ;;       ;; We must find the encoded string of CHAR.  But, just encoding
 ;;       ;; CHAR will put extra control sequences (usually to designate
-;;       ;; ASCII charaset) at the tail if type of CODING is ISO 2022.
+;;       ;; ASCII charset) at the tail if type of CODING is ISO 2022.
 ;;       ;; To exclude such tailing bytes, we at first encode one-char
 ;;       ;; string and two-char string, then check how many bytes at the
 ;;       ;; tail of both encoded strings are the same.