Mercurial > hg > xemacs-beta
comparison lisp/mule/japanese.el @ 5473:ac37a5f7e5be
Merge with trunk.
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Thu, 17 Mar 2011 23:42:59 +0100 |
parents | 308d34e9f07d 311f6817efc2 |
children | bbe4146603db |
comparison
equal
deleted
inserted
replaced
5472:e79980ee5efe | 5473:ac37a5f7e5be |
---|---|
440 ;; Set the native-coding-system separately so the lambdas get compiled. (Not | 440 ;; Set the native-coding-system separately so the lambdas get compiled. (Not |
441 ;; a huge speed improvement, but this code is called at startup, and every | 441 ;; a huge speed improvement, but this code is called at startup, and every |
442 ;; little helps there.) | 442 ;; little helps there.) |
443 (set-language-info "Japanese" | 443 (set-language-info "Japanese" |
444 'native-coding-system | 444 'native-coding-system |
445 (list | 445 ;; first, see if an explicit encoding was given. |
446 ;; first, see if an explicit encoding was given. | 446 (lambda (locale) |
447 (lambda (locale) | 447 (let ((case-fold-search t)) |
448 (let ((case-fold-search t)) | 448 (cond |
449 (cond | 449 ;; many unix versions |
450 ;; many unix versions | 450 ((string-match "\\.euc" locale) 'euc-jp) |
451 ((string-match "\\.euc" locale) 'euc-jp) | 451 ((string-match "\\.sjis" locale) 'shift-jis) |
452 ((string-match "\\.sjis" locale) 'shift-jis) | 452 |
453 | 453 ;; X11R6 (CJKV p. 471) |
454 ;; X11R6 (CJKV p. 471) | 454 ((string-match "\\.jis7" locale) 'jis7) |
455 ((string-match "\\.jis7" locale) 'jis7) | 455 ((string-match "\\.jis8" locale) 'jis8) |
456 ((string-match "\\.jis8" locale) 'jis8) | 456 ((string-match "\\.mscode" locale) 'shift-jis) |
457 ((string-match "\\.mscode" locale) 'shift-jis) | 457 ((string-match "\\.pjis" locale) 'iso-2022-jp) |
458 ((string-match "\\.pjis" locale) 'iso-2022-jp) | 458 ((string-match "\\.ujis" locale) 'euc-jp) |
459 ((string-match "\\.ujis" locale) 'euc-jp) | 459 |
460 | 460 ;; other names in X11R6 locale.alias |
461 ;; other names in X11R6 locale.alias | 461 ((string-match "\\.ajec" locale) 'euc-jp) |
462 ((string-match "\\.ajec" locale) 'euc-jp) | 462 ((string-match "-euc" locale) 'euc-jp) |
463 ((string-match "-euc" locale) 'euc-jp) | 463 ((string-match "\\.iso-2022-jp" locale) 'iso-2022-jp) |
464 ((string-match "\\.iso-2022-jp" locale) 'iso-2022-jp) | 464 ((string-match "\\.jis" locale) 'jis7) ;; or just jis? |
465 ((string-match "\\.jis" locale) 'jis7) ;; or just jis? | 465 |
466 ))) | 466 ;; aix (CJKV p. 465) |
467 | 467 ((and (eq system-type 'aix) |
468 ;; aix (CJKV p. 465) | 468 (string-match "^Ja_JP" locale)) 'shift-jis) |
469 (lambda (locale) | 469 ((and (eq system-type 'aix) |
470 (when (eq system-type 'aix) | 470 (string-match "^ja_JP" locale)) 'euc-jp) |
471 (cond | 471 |
472 ((string-match "^Ja_JP" locale) 'shift-jis) | 472 ;; other X11R6 locale.alias |
473 ((string-match "^ja_JP" locale) 'euc-jp)))) | |
474 | |
475 ;; other X11R6 locale.alias | |
476 (lambda (locale) | |
477 (cond | |
478 ((string-match "^Jp_JP" locale) 'euc-jp) | 473 ((string-match "^Jp_JP" locale) 'euc-jp) |
479 ((and (eq system-type 'hpux) (eq locale "japanese")) | 474 ((and (eq system-type 'hpux) (eq locale "japanese")) |
480 'shift-jis))) | 475 'shift-jis) |
481 | 476 ;; fallback |
482 ;; fallback | 477 (t 'euc-jp))))) |
483 'euc-jp)) | |
484 | 478 |
485 ;;; japanese.el ends here | 479 ;;; japanese.el ends here |