aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-07-05 18:35:37 +0000
committerRichard M. Stallman1994-07-05 18:35:37 +0000
commit30dc01ea24f61c5f0a2561b8a36c2e259811d6e1 (patch)
treebe64783c51cb16261a9d7683fdaee4cf5d56c99d
parent7a41a2e2b86d612bc8e9e9be716330c900e73105 (diff)
downloademacs-30dc01ea24f61c5f0a2561b8a36c2e259811d6e1.tar.gz
emacs-30dc01ea24f61c5f0a2561b8a36c2e259811d6e1.zip
(command-line): Check LC_ALL and LANG as well as LC_CTYPE.
(iso-8859-1-locale-regexp): Don't check for `iso'.
-rw-r--r--lisp/startup.el19
1 files changed, 15 insertions, 4 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 4fece7dda51..251f395abd7 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -141,6 +141,11 @@ higher incidence of change, don't make sense to load into emacs'
141dumped image. Thus, the run-time load order is: 1. file described in 141dumped image. Thus, the run-time load order is: 1. file described in
142this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.") 142this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.")
143 143
144(defconst iso-8859-1-locale-regexp "8859[-_]?1"
145 "Regexp that specifies when to enable the ISO 8859-1 character set.
146We do that if this regexp matches the locale name
147specified by the LC_ALL, LC_CTYPE and LANG environment variables.")
148
144(defvar user-mail-address nil 149(defvar user-mail-address nil
145 "Full mailing address of this user.") 150 "Full mailing address of this user.")
146 151
@@ -201,9 +206,6 @@ this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.")
201 (x-popup-menu nil (cdr (cdr (car submap))))) 206 (x-popup-menu nil (cdr (cdr (car submap)))))
202 (setq submap (cdr submap)))))) 207 (setq submap (cdr submap))))))
203 208
204(defconst iso-8859-1-locale-regexp "iso[-_]?8859[-_]1"
205 "Use ISO 8859-1 character set by default if this regexp matches LC_CTYPE.")
206
207(defun command-line () 209(defun command-line ()
208 (setq command-line-default-directory default-directory) 210 (setq command-line-default-directory default-directory)
209 211
@@ -220,7 +222,16 @@ this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.")
220 (string= vc "simple")) 222 (string= vc "simple"))
221 (setq version-control 'never)))) 223 (setq version-control 'never))))
222 224
223 (if (string-match iso-8859-1-locale-regexp (getenv "LC_CTYPE")) 225 (if (let ((ctype
226 ;; Use the first of these three envvars that has a nonempty value.
227 (or (let ((string (getenv "LC_ALL")))
228 (and (not (equal string "")) string))
229 (let ((string (getenv "LC_CTYPE")))
230 (and (not (equal string "")) string))
231 (let ((string (getenv "LANG")))
232 (and (not (equal string "")) string)))))
233 (and ctype
234 (string-match iso-8859-1-locale-regexp ctype)))
224 (progn 235 (progn
225 (standard-display-european t) 236 (standard-display-european t)
226 (require 'iso-syntax))) 237 (require 'iso-syntax)))