Mercurial > emacs
comparison lisp/international/mule-cmds.el @ 49796:9444af9dba75
(locale-language-names): Use Italian,
Russian, Turkish, Chinese-EUC-TW.
(set-locale-environment): Set ps-paper-type.
author | Dave Love <fx@gnu.org> |
---|---|
date | Fri, 14 Feb 2003 18:42:31 +0000 |
parents | 2207016a3e9e |
children | f2c182eeeda2 |
comparison
equal
deleted
inserted
replaced
49795:0f184780c237 | 49796:9444af9dba75 |
---|---|
1 ;;; mule-cmds.el --- commands for mulitilingual environment | 1 ;;; mule-cmds.el --- commands for mulitilingual environment |
2 | |
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | 2 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. |
4 ;; Licensed to the Free Software Foundation. | 3 ;; Licensed to the Free Software Foundation. |
5 ;; Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. | 4 ;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. |
6 | 5 |
7 ;; Keywords: mule, multilingual | 6 ;; Keywords: mule, multilingual |
8 | 7 |
9 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
10 | 9 |
1936 ("br" . "Latin-1") ; Breton | 1935 ("br" . "Latin-1") ; Breton |
1937 ("bs" . "Latin-2") ; Bosnian | 1936 ("bs" . "Latin-2") ; Bosnian |
1938 ("ca" . "Latin-1") ; Catalan | 1937 ("ca" . "Latin-1") ; Catalan |
1939 ; co Corsican | 1938 ; co Corsican |
1940 ("cs" . "Czech") | 1939 ("cs" . "Czech") |
1941 ("cy" . "Welsh") ; Welsh | 1940 ("cy" . "Welsh") ; Welsh [glibc uses Latin-8. Did this change?] |
1942 ("da" . "Latin-1") ; Danish | 1941 ("da" . "Latin-1") ; Danish |
1943 ("de" . "German") | 1942 ("de" . "German") |
1944 ; dz Bhutani | 1943 ; dz Bhutani |
1945 ("el" . "Greek") | 1944 ("el" . "Greek") |
1946 ;; Users who specify "en" explicitly typically want Latin-1, not ASCII. | 1945 ;; Users who specify "en" explicitly typically want Latin-1, not ASCII. |
1972 ; ia Interlingua | 1971 ; ia Interlingua |
1973 ("id" . "Latin-1") ; Indonesian | 1972 ("id" . "Latin-1") ; Indonesian |
1974 ; ie Interlingue | 1973 ; ie Interlingue |
1975 ; ik Inupiak | 1974 ; ik Inupiak |
1976 ("is" . "Latin-1") ; Icelandic | 1975 ("is" . "Latin-1") ; Icelandic |
1977 ("it" . "Latin-1") ; Italian | 1976 ("it" . "Italian") ; Italian |
1978 ; iu Inuktitut | 1977 ; iu Inuktitut |
1979 ("ja" . "Japanese") | 1978 ("ja" . "Japanese") |
1980 ; jw Javanese | 1979 ; jw Javanese |
1981 ("ka" . "Georgian") ; Georgian | 1980 ("ka" . "Georgian") ; Georgian |
1982 ; kk Kazakh | 1981 ; kk Kazakh |
2017 ("pt" . "Latin-1") ; Portuguese | 2016 ("pt" . "Latin-1") ; Portuguese |
2018 ; qu Quechua | 2017 ; qu Quechua |
2019 ("rm" . "Latin-1") ; Rhaeto-Romanic | 2018 ("rm" . "Latin-1") ; Rhaeto-Romanic |
2020 ; rn Kirundi | 2019 ; rn Kirundi |
2021 ("ro" . "Romanian") | 2020 ("ro" . "Romanian") |
2022 ("ru.*[_.]koi8" . "Cyrillic-KOI8") ; Russian | 2021 ("ru.*[_.]koi8" . "Russian") |
2023 ("ru" . "Cyrillic-ISO") ; Russian | 2022 ("ru" . "Cyrillic-ISO") ; Russian |
2024 ; rw Kinyarwanda | 2023 ; rw Kinyarwanda |
2025 ("sa" . "Devanagari") ; Sanskrit | 2024 ("sa" . "Devanagari") ; Sanskrit |
2026 ; sd Sindhi | 2025 ; sd Sindhi |
2027 ; se Northern Sami | 2026 ; se Northern Sami |
2048 ; ti Tigrinya | 2047 ; ti Tigrinya |
2049 ; tk Turkmen | 2048 ; tk Turkmen |
2050 ("tl" . "Latin-1") ; Tagalog | 2049 ("tl" . "Latin-1") ; Tagalog |
2051 ; tn Setswana | 2050 ; tn Setswana |
2052 ; to Tonga | 2051 ; to Tonga |
2053 ("tr" . "Latin-5") ; Turkish | 2052 ("tr" . "Turkish") |
2054 ; ts Tsonga | 2053 ; ts Tsonga |
2055 ; tt Tatar | 2054 ; tt Tatar |
2056 ; tw Twi | 2055 ; tw Twi |
2057 ; ug Uighur | 2056 ; ug Uighur |
2058 ("uk" . "Ukrainian") ; Ukrainian | 2057 ("uk" . "Ukrainian") ; Ukrainian |
2069 | 2068 |
2070 ; glibc: | 2069 ; glibc: |
2071 ; zh_CN.GB18030/GB18030 \ | 2070 ; zh_CN.GB18030/GB18030 \ |
2072 ; zh_CN.GBK/GBK \ | 2071 ; zh_CN.GBK/GBK \ |
2073 ; zh_HK/BIG5-HKSCS \ | 2072 ; zh_HK/BIG5-HKSCS \ |
2074 ; zh_TW/BIG5 \ | |
2075 ; zh_TW.EUC-TW/EUC-TW \ | |
2076 | 2073 |
2077 ("zh.*[._]big5" . "Chinese-BIG5") | 2074 ("zh.*[._]big5" . "Chinese-BIG5") |
2078 ("zh.*[._]gbk" . nil) ; Solaris 2.7; has gbk-0 as well as GB 2312.1980-0 | 2075 ("zh.*[._]gbk" . nil) ; Solaris 2.7; has gbk-0 as well as GB 2312.1980-0 |
2079 ("zh_tw" . "Chinese-CNS") | 2076 ("zh_tw" . "Chinese-CNS") ; glibc uses big5 |
2077 ("zh_tw[._]euc-tw" . "Chinese-EUC-TW") | |
2080 ("zh" . "Chinese-GB") | 2078 ("zh" . "Chinese-GB") |
2081 ; zu Zulu | 2079 ; zu Zulu |
2082 | 2080 |
2083 ;; ISO standard locales | 2081 ;; ISO standard locales |
2084 ("c$" . "ASCII") | 2082 ("c$" . "ASCII") |
2254 (setq locale-coding-system | 2252 (setq locale-coding-system |
2255 (car (get-language-info language-name 'coding-priority)))) | 2253 (car (get-language-info language-name 'coding-priority)))) |
2256 | 2254 |
2257 (when coding-system | 2255 (when coding-system |
2258 (prefer-coding-system coding-system) | 2256 (prefer-coding-system coding-system) |
2259 (setq locale-coding-system coding-system)))))) | 2257 (setq locale-coding-system coding-system)))) |
2258 | |
2259 ;; Default to A4 paper if we're not in a C, POSIX or US locale. | |
2260 ;; (See comments in Flanginfo.) | |
2261 (let ((locale locale) | |
2262 (paper (langinfo 'paper))) | |
2263 (if paper | |
2264 ;; This will always be null at the time of writing. | |
2265 (cond | |
2266 ((equal paper '(216 279)) | |
2267 (setq ps-paper-type 'letter)) | |
2268 ((equal paper '(210 297)) | |
2269 (setq ps-paper-type 'a4))) | |
2270 (let ((vars '("LC_ALL" "LC_PAPER" "LANG"))) | |
2271 (while (and vars (= 0 (length locale))) | |
2272 (setq locale (getenv (pop vars))))) | |
2273 (when locale | |
2274 ;; As of glibc 2.2.5, these are the only US Letter locales, | |
2275 ;; and the rest are A4. | |
2276 (setq ps-paper-type | |
2277 (or (locale-name-match locale '(("c$" . letter) | |
2278 ("posix$" . letter) | |
2279 (".._us" . letter) | |
2280 (".._pr" . letter) | |
2281 (".._ca" . letter))) | |
2282 'a4)))))) | |
2283 nil) | |
2260 | 2284 |
2261 ;;; Charset property | 2285 ;;; Charset property |
2262 | 2286 |
2263 (defun get-charset-property (charset propname) | 2287 (defun get-charset-property (charset propname) |
2264 "Return the value of CHARSET's PROPNAME property. | 2288 "Return the value of CHARSET's PROPNAME property. |