diff 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
line wrap: on
line diff
--- a/lisp/mule/japanese.el	Tue Mar 01 14:18:54 2011 +0000
+++ b/lisp/mule/japanese.el	Tue Mar 08 18:12:48 2011 +0000
@@ -444,44 +444,38 @@
 ;; little helps there.)
 (set-language-info "Japanese"
                    'native-coding-system
-                   (list
-                    ;; first, see if an explicit encoding was given.
-                    (lambda (locale)
-                      (let ((case-fold-search t))
-                        (cond
-                         ;; many unix versions
-                         ((string-match "\\.euc" locale) 'euc-jp)
-                         ((string-match "\\.sjis" locale) 'shift-jis)
-
-                         ;; X11R6 (CJKV p. 471)
-                         ((string-match "\\.jis7" locale) 'jis7)
-                         ((string-match "\\.jis8" locale) 'jis8)
-                         ((string-match "\\.mscode" locale) 'shift-jis)
-                         ((string-match "\\.pjis" locale) 'iso-2022-jp)
-                         ((string-match "\\.ujis" locale) 'euc-jp)
+                   ;; first, see if an explicit encoding was given.
+                   (lambda (locale)
+                     (let ((case-fold-search t))
+                       (cond
+                        ;; many unix versions
+                        ((string-match "\\.euc" locale) 'euc-jp)
+                        ((string-match "\\.sjis" locale) 'shift-jis)
 
-                         ;; other names in X11R6 locale.alias
-                         ((string-match "\\.ajec" locale) 'euc-jp)
-                         ((string-match "-euc" locale) 'euc-jp)
-                         ((string-match "\\.iso-2022-jp" locale) 'iso-2022-jp)
-                         ((string-match "\\.jis" locale) 'jis7) ;; or just jis?
-                         )))
+                        ;; X11R6 (CJKV p. 471)
+                        ((string-match "\\.jis7" locale) 'jis7)
+                        ((string-match "\\.jis8" locale) 'jis8)
+                        ((string-match "\\.mscode" locale) 'shift-jis)
+                        ((string-match "\\.pjis" locale) 'iso-2022-jp)
+                        ((string-match "\\.ujis" locale) 'euc-jp)
 
-                    ;; aix (CJKV p. 465)
-                    (lambda (locale)
-                      (when (eq system-type 'aix)
-                        (cond
-                         ((string-match "^Ja_JP" locale) 'shift-jis)
-                         ((string-match "^ja_JP" locale) 'euc-jp))))
+                        ;; other names in X11R6 locale.alias
+                        ((string-match "\\.ajec" locale) 'euc-jp)
+                        ((string-match "-euc" locale) 'euc-jp)
+                        ((string-match "\\.iso-2022-jp" locale) 'iso-2022-jp)
+                        ((string-match "\\.jis" locale) 'jis7) ;; or just jis?
 
-                    ;; other X11R6 locale.alias
-                    (lambda (locale)
-                      (cond
+                        ;; aix (CJKV p. 465)
+                        ((and (eq system-type 'aix)
+                              (string-match "^Ja_JP" locale)) 'shift-jis)
+                        ((and (eq system-type 'aix)
+                              (string-match "^ja_JP" locale)) 'euc-jp)
+
+                       ;; other X11R6 locale.alias
                        ((string-match "^Jp_JP" locale) 'euc-jp)
                        ((and (eq system-type 'hpux) (eq locale "japanese"))
-                        'shift-jis)))
-
-                    ;; fallback
-                    'euc-jp))
+                        'shift-jis)
+                       ;; fallback
+                       (t 'euc-jp)))))
 
 ;;; japanese.el ends here