comparison lisp/mule/japanese.el @ 5363:311f6817efc2

Remove various redundant wrapper lambdas, core lisp. 2011-03-08 Aidan Kehoe <kehoea@parhasard.net> * package-ui.el (pui-add-required-packages): * packages.el (packages-handle-package-dumped-lisps): * bytecomp-runtime.el (byte-compile-with-fboundp): * bytecomp-runtime.el (globally-declare-fboundp): * bytecomp-runtime.el (byte-compile-with-byte-compiler-warnings-suppressed): * mule/devan-util.el (devanagari-reorder-glyphs-for-composition): * mule/devan-util.el (devanagari-compose-to-one-glyph): * mule/japanese.el: * mule/japanese.el ("Japanese"): * mule/make-coding-system.el (fixed-width-generate-helper): * mule/mule-category.el (defined-category-list): * mule/mule-category.el (undefined-category-designator): Style change: remove redundant lambdas, things like (mapcar #'(lambda (pkg) (symbol-name pkg)) ...) => (mapcar #'symbol-name ...).
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 08 Mar 2011 18:12:48 +0000
parents 1d74a1d115ee
children ac37a5f7e5be
comparison
equal deleted inserted replaced
5362:1cfe6b84efbf 5363:311f6817efc2
442 ;; Set the native-coding-system separately so the lambdas get compiled. (Not 442 ;; Set the native-coding-system separately so the lambdas get compiled. (Not
443 ;; a huge speed improvement, but this code is called at startup, and every 443 ;; a huge speed improvement, but this code is called at startup, and every
444 ;; little helps there.) 444 ;; little helps there.)
445 (set-language-info "Japanese" 445 (set-language-info "Japanese"
446 'native-coding-system 446 'native-coding-system
447 (list 447 ;; first, see if an explicit encoding was given.
448 ;; first, see if an explicit encoding was given. 448 (lambda (locale)
449 (lambda (locale) 449 (let ((case-fold-search t))
450 (let ((case-fold-search t)) 450 (cond
451 (cond 451 ;; many unix versions
452 ;; many unix versions 452 ((string-match "\\.euc" locale) 'euc-jp)
453 ((string-match "\\.euc" locale) 'euc-jp) 453 ((string-match "\\.sjis" locale) 'shift-jis)
454 ((string-match "\\.sjis" locale) 'shift-jis) 454
455 455 ;; X11R6 (CJKV p. 471)
456 ;; X11R6 (CJKV p. 471) 456 ((string-match "\\.jis7" locale) 'jis7)
457 ((string-match "\\.jis7" locale) 'jis7) 457 ((string-match "\\.jis8" locale) 'jis8)
458 ((string-match "\\.jis8" locale) 'jis8) 458 ((string-match "\\.mscode" locale) 'shift-jis)
459 ((string-match "\\.mscode" locale) 'shift-jis) 459 ((string-match "\\.pjis" locale) 'iso-2022-jp)
460 ((string-match "\\.pjis" locale) 'iso-2022-jp) 460 ((string-match "\\.ujis" locale) 'euc-jp)
461 ((string-match "\\.ujis" locale) 'euc-jp) 461
462 462 ;; other names in X11R6 locale.alias
463 ;; other names in X11R6 locale.alias 463 ((string-match "\\.ajec" locale) 'euc-jp)
464 ((string-match "\\.ajec" locale) 'euc-jp) 464 ((string-match "-euc" locale) 'euc-jp)
465 ((string-match "-euc" locale) 'euc-jp) 465 ((string-match "\\.iso-2022-jp" locale) 'iso-2022-jp)
466 ((string-match "\\.iso-2022-jp" locale) 'iso-2022-jp) 466 ((string-match "\\.jis" locale) 'jis7) ;; or just jis?
467 ((string-match "\\.jis" locale) 'jis7) ;; or just jis? 467
468 ))) 468 ;; aix (CJKV p. 465)
469 469 ((and (eq system-type 'aix)
470 ;; aix (CJKV p. 465) 470 (string-match "^Ja_JP" locale)) 'shift-jis)
471 (lambda (locale) 471 ((and (eq system-type 'aix)
472 (when (eq system-type 'aix) 472 (string-match "^ja_JP" locale)) 'euc-jp)
473 (cond 473
474 ((string-match "^Ja_JP" locale) 'shift-jis) 474 ;; other X11R6 locale.alias
475 ((string-match "^ja_JP" locale) 'euc-jp))))
476
477 ;; other X11R6 locale.alias
478 (lambda (locale)
479 (cond
480 ((string-match "^Jp_JP" locale) 'euc-jp) 475 ((string-match "^Jp_JP" locale) 'euc-jp)
481 ((and (eq system-type 'hpux) (eq locale "japanese")) 476 ((and (eq system-type 'hpux) (eq locale "japanese"))
482 'shift-jis))) 477 'shift-jis)
483 478 ;; fallback
484 ;; fallback 479 (t 'euc-jp)))))
485 'euc-jp))
486 480
487 ;;; japanese.el ends here 481 ;;; japanese.el ends here