[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/term/mac-win.el
From: |
YAMAMOTO Mitsuharu |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/term/mac-win.el |
Date: |
Tue, 12 Apr 2005 06:27:29 -0400 |
Index: emacs/lisp/term/mac-win.el
diff -c emacs/lisp/term/mac-win.el:1.37 emacs/lisp/term/mac-win.el:1.38
*** emacs/lisp/term/mac-win.el:1.37 Tue Apr 12 09:01:36 2005
--- emacs/lisp/term/mac-win.el Tue Apr 12 10:27:29 2005
***************
*** 1085,1097 ****
(put 'escape 'ascii-character ?\e)
! ;;;; Keysyms
! ;; Define constant values to be set to mac-keyboard-text-encoding
! (defconst kTextEncodingMacRoman 0)
! (defconst kTextEncodingISOLatin1 513 "0x201")
! (defconst kTextEncodingISOLatin2 514 "0x202")
;;;; Selections and cut buffers
--- 1085,1113 ----
(put 'escape 'ascii-character ?\e)
! ;;;; Keyboard layout/language change events
! (defconst mac-script-code-coding-systems
! '((0 . mac-roman) ; smRoman
! (1 . japanese-shift-jis) ; smJapanese
! (2 . chinese-big5) ; smTradChinese
! (3 . korean-iso-8bit) ; smKorean
! (7 . mac-cyrillic) ; smCyrillic
! (25 . chinese-iso-8bit) ; smSimpChinese
! (29 . mac-centraleurroman) ; smCentralEuroRoman
! )
! "Alist of Mac script codes vs Emacs coding systems.")
! ;;;; Keyboard layout/language change events
! (defun mac-handle-language-change (event)
! (interactive "e")
! (let ((coding-system
! (cdr (assq (car (cadr event)) mac-script-code-coding-systems))))
! (set-keyboard-coding-system (or coding-system 'mac-roman))
! ;; MacJapanese maps reverse solidus to ?\x80.
! (if (eq coding-system 'japanese-shift-jis)
! (define-key key-translation-map [?\x80] "\\"))))
+ (define-key special-event-map [language-change] 'mac-handle-language-change)
;;;; Selections and cut buffers
***************
*** 1139,1159 ****
(setq frame-creation-function 'x-create-frame-with-faces)
! (define-ccl-program ccl-encode-mac-roman-font
! `(0
! (if (r0 != ,(charset-id 'ascii))
! (if (r0 <= ?\x8f)
! (translate-character mac-roman-encoder r0 r1)
! ((r1 <<= 7)
! (r1 |= r2)
! (translate-character mac-roman-encoder r0 r1)))))
! "CCL program for Mac Roman font")
!
! (let
! ((encoding-vector (make-vector 256 nil))
! (i 0)
! (vec ;; mac-centraleurroman (128..255) -> UCS mapping
! [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS
#x0100 ;; 129:LATIN CAPITAL LETTER A WITH MACRON
#x0101 ;; 130:LATIN SMALL LETTER A WITH MACRON
#x00C9 ;; 131:LATIN CAPITAL LETTER E WITH ACUTE
--- 1155,1168 ----
(setq frame-creation-function 'x-create-frame-with-faces)
! (cp-make-coding-system
! mac-centraleurroman
! (apply
! 'vector
! (mapcar
! (lambda (c) (decode-char 'ucs c))
! ;; mac-centraleurroman (128..255) -> UCS mapping
! [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS
#x0100 ;; 129:LATIN CAPITAL LETTER A WITH MACRON
#x0101 ;; 130:LATIN SMALL LETTER A WITH MACRON
#x00C9 ;; 131:LATIN CAPITAL LETTER E WITH ACUTE
***************
*** 1281,1306 ****
#x017C ;; 253:LATIN SMALL LETTER Z WITH DOT ABOVE
#x0122 ;; 254:LATIN CAPITAL LETTER G WITH CEDILLA
#x02C7 ;; 255:CARON
! ])
! translation-table)
! (while (< i 128)
! (aset encoding-vector i i)
! (setq i (1+ i)))
! (while (< i 256)
! (aset encoding-vector i
! (decode-char 'ucs (aref vec (- i 128))))
! (setq i (1+ i)))
! (setq translation-table
! (make-translation-table-from-vector encoding-vector))
! ;; (define-translation-table 'mac-centraleurroman-decoder translation-table)
! (define-translation-table 'mac-centraleurroman-encoder
! (char-table-extra-slot translation-table 0)))
!
! (let
! ((encoding-vector (make-vector 256 nil))
! (i 0)
! (vec ;; mac-cyrillic (128..255) -> UCS mapping
! [ #x0410 ;; 128:CYRILLIC CAPITAL LETTER A
#x0411 ;; 129:CYRILLIC CAPITAL LETTER BE
#x0412 ;; 130:CYRILLIC CAPITAL LETTER VE
#x0413 ;; 131:CYRILLIC CAPITAL LETTER GHE
--- 1290,1307 ----
#x017C ;; 253:LATIN SMALL LETTER Z WITH DOT ABOVE
#x0122 ;; 254:LATIN CAPITAL LETTER G WITH CEDILLA
#x02C7 ;; 255:CARON
! ]))
! "Mac Central European Roman Encoding (MIME:x-mac-centraleurroman).")
! (coding-system-put 'mac-centraleurroman 'mime-charset 'x-mac-centraleurroman)
!
! (cp-make-coding-system
! mac-cyrillic
! (apply
! 'vector
! (mapcar
! (lambda (c) (decode-char 'ucs c))
! ;; mac-cyrillic (128..255) -> UCS mapping
! [ #x0410 ;; 128:CYRILLIC CAPITAL LETTER A
#x0411 ;; 129:CYRILLIC CAPITAL LETTER BE
#x0412 ;; 130:CYRILLIC CAPITAL LETTER VE
#x0413 ;; 131:CYRILLIC CAPITAL LETTER GHE
***************
*** 1428,1454 ****
#x044D ;; 253:CYRILLIC SMALL LETTER E
#x044E ;; 254:CYRILLIC SMALL LETTER YU
#x20AC ;; 255:EURO SIGN
! ])
! translation-table)
! (while (< i 128)
! (aset encoding-vector i i)
! (setq i (1+ i)))
! (while (< i 256)
! (aset encoding-vector i
! (decode-char 'ucs (aref vec (- i 128))))
! (setq i (1+ i)))
! (setq translation-table
! (make-translation-table-from-vector encoding-vector))
! ;; (define-translation-table 'mac-cyrillic-decoder translation-table)
! (define-translation-table 'mac-cyrillic-encoder
! (char-table-extra-slot translation-table 0)))
(defvar mac-font-encoder-list
'(("mac-roman" mac-roman-encoder
ccl-encode-mac-roman-font "%s")
! ("mac-centraleurroman" mac-centraleurroman-encoder
ccl-encode-mac-centraleurroman-font "%s ce")
! ("mac-cyrillic" mac-cyrillic-encoder
ccl-encode-mac-cyrillic-font "%s cy")))
(let ((encoder-list
--- 1429,1444 ----
#x044D ;; 253:CYRILLIC SMALL LETTER E
#x044E ;; 254:CYRILLIC SMALL LETTER YU
#x20AC ;; 255:EURO SIGN
! ]))
! "Mac Cyrillic Encoding (MIME:x-mac-cyrillic).")
! (coding-system-put 'mac-cyrillic 'mime-charset 'x-mac-cyrillic)
(defvar mac-font-encoder-list
'(("mac-roman" mac-roman-encoder
ccl-encode-mac-roman-font "%s")
! ("mac-centraleurroman" encode-mac-centraleurroman
ccl-encode-mac-centraleurroman-font "%s ce")
! ("mac-cyrillic" encode-mac-cyrillic
ccl-encode-mac-cyrillic-font "%s cy")))
(let ((encoder-list
***************
*** 1468,1491 ****
(if mac-encoded
(aset table c mac-encoded))))))))
(define-ccl-program ccl-encode-mac-centraleurroman-font
`(0
(if (r0 != ,(charset-id 'ascii))
(if (r0 <= ?\x8f)
! (translate-character mac-centraleurroman-encoder r0 r1)
((r1 <<= 7)
(r1 |= r2)
! (translate-character mac-centraleurroman-encoder r0 r1)))))
"CCL program for Mac Central European Roman font")
(define-ccl-program ccl-encode-mac-cyrillic-font
`(0
(if (r0 != ,(charset-id 'ascii))
(if (r0 <= ?\x8f)
! (translate-character mac-cyrillic-encoder r0 r1)
((r1 <<= 7)
(r1 |= r2)
! (translate-character mac-cyrillic-encoder r0 r1)))))
"CCL program for Mac Cyrillic font")
--- 1458,1491 ----
(if mac-encoded
(aset table c mac-encoded))))))))
+ (define-ccl-program ccl-encode-mac-roman-font
+ `(0
+ (if (r0 != ,(charset-id 'ascii))
+ (if (r0 <= ?\x8f)
+ (translate-character mac-roman-encoder r0 r1)
+ ((r1 <<= 7)
+ (r1 |= r2)
+ (translate-character mac-roman-encoder r0 r1)))))
+ "CCL program for Mac Roman font")
+
(define-ccl-program ccl-encode-mac-centraleurroman-font
`(0
(if (r0 != ,(charset-id 'ascii))
(if (r0 <= ?\x8f)
! (translate-character encode-mac-centraleurroman r0 r1)
((r1 <<= 7)
(r1 |= r2)
! (translate-character encode-mac-centraleurroman r0 r1)))))
"CCL program for Mac Central European Roman font")
(define-ccl-program ccl-encode-mac-cyrillic-font
`(0
(if (r0 != ,(charset-id 'ascii))
(if (r0 <= ?\x8f)
! (translate-character encode-mac-cyrillic r0 r1)
((r1 <<= 7)
(r1 |= r2)
! (translate-character encode-mac-cyrillic r0 r1)))))
"CCL program for Mac Cyrillic font")
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el, YAMAMOTO Mitsuharu, 2005/04/05
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el, YAMAMOTO Mitsuharu, 2005/04/12
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el,
YAMAMOTO Mitsuharu <=
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el, YAMAMOTO Mitsuharu, 2005/04/14
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el, YAMAMOTO Mitsuharu, 2005/04/19
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el, YAMAMOTO Mitsuharu, 2005/04/19
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el, YAMAMOTO Mitsuharu, 2005/04/19
- [Emacs-diffs] Changes to emacs/lisp/term/mac-win.el, YAMAMOTO Mitsuharu, 2005/04/24