aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2003-02-14 18:42:31 +0000
committerDave Love2003-02-14 18:42:31 +0000
commite76ef161e6480926d6aac8bafa816f387dc03c27 (patch)
tree0cf0d5f87e68d9ca3aa8df42d876cf799cc5e938
parent765093893d6dd491ae20fe2a10c67c4e6b664a5b (diff)
downloademacs-e76ef161e6480926d6aac8bafa816f387dc03c27.tar.gz
emacs-e76ef161e6480926d6aac8bafa816f387dc03c27.zip
(locale-language-names): Use Italian,
Russian, Turkish, Chinese-EUC-TW. (set-locale-environment): Set ps-paper-type.
-rw-r--r--lisp/international/mule-cmds.el44
1 files changed, 34 insertions, 10 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 01bb05a0955..f393b0408aa 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -1,8 +1,7 @@
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
@@ -1938,7 +1937,7 @@ of `buffer-file-coding-system' set by this function."
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
@@ -1974,7 +1973,7 @@ of `buffer-file-coding-system' set by this function."
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
@@ -2019,7 +2018,7 @@ of `buffer-file-coding-system' set by this function."
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
@@ -2050,7 +2049,7 @@ of `buffer-file-coding-system' set by this function."
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
@@ -2071,12 +2070,11 @@ of `buffer-file-coding-system' set by this function."
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
@@ -2256,7 +2254,33 @@ See also `locale-charset-language-names', `locale-language-names',
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