comparison lisp/mule/general-late.el @ 4145:edb00a8b4eff

[xemacs-hg @ 2007-08-26 20:00:29 by aidan] Generally make the language environments and coding systems a little more sane.
author aidan
date Sun, 26 Aug 2007 20:00:42 +0000
parents c098c0d9125f
children 9fec7fedbf1b
comparison
equal deleted inserted replaced
4144:4a08a9219456 4145:edb00a8b4eff
27 27
28 ;; The variable is declared in mule-cmds.el; it's initialised here, to give 28 ;; The variable is declared in mule-cmds.el; it's initialised here, to give
29 ;; the language-specific code a chance to create its coding systems. 29 ;; the language-specific code a chance to create its coding systems.
30 30
31 (setq posix-charset-to-coding-system-hash 31 (setq posix-charset-to-coding-system-hash
32 (eval-when-compile 32 (loop
33 (let ((res (make-hash-table :test 'equal))) 33 ;; We want both normal and internal coding systems in order
34 ;; We want both normal and internal coding systems in order 34 ;; to pick up coding system aliases.
35 ;; to pick up coding system aliases. 35 for coding-system in (coding-system-list 'every)
36 (dolist (coding-system (coding-system-list 'both-normal-and-internal) res) 36 with res = (make-hash-table :test #'equal)
37 (setq coding-system 37 do
38 (symbol-name coding-system)) 38 (setq coding-system (symbol-name coding-system))
39 (unless (or (string-match #r"\(-unix\|-mac\|-dos\)$" coding-system) 39 (unless (or (string-match #r"\(-unix\|-mac\|-dos\)$" coding-system)
40 (string-match #r"^\(internal\|mswindows\)" coding-system)) 40 (string-match #r"^\(internal\|mswindows\)" coding-system))
41 (puthash 41 (puthash
42 (replace-in-string (downcase coding-system) "[^a-z0-9]" "") 42 (replace-in-string (downcase coding-system) "[^a-z0-9]" "")
43 (coding-system-name (intern coding-system)) res))))) 43 (coding-system-name (intern coding-system)) res))
44 finally return res)
44 45
45 ;; In a thoughtless act of cultural imperialism, move English, German 46 ;; In a thoughtless act of cultural imperialism, move English, German
46 ;; and Japanese to the front of language-info-alist to make start-up a 47 ;; and Japanese to the front of language-info-alist to make start-up a
47 ;; fraction faster for those languages. 48 ;; fraction faster for those languages.
48 language-info-alist 49 language-info-alist