diff options
author | Dave Love <[email protected]> | 2003-01-05 00:38:05 +0000 |
---|---|---|
committer | Dave Love <[email protected]> | 2003-01-05 00:38:05 +0000 |
commit | db6bd804adccc378d20706ef5ec7494e983968d2 (patch) | |
tree | 06055a29eaad4fd50bf3e16c7e1451c9bf485109 /lisp/international/mule-cmds.el | |
parent | 56cfa2440ebcfe17fa70175165effc24bfa44b3d (diff) |
(set-locale-environment): Ignore
empty values of environment variables.
Diffstat (limited to 'lisp/international/mule-cmds.el')
-rw-r--r-- | lisp/international/mule-cmds.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index c70fa7a43a..0e6f74d200 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2187,8 +2187,9 @@ See also `locale-charset-language-names', `locale-language-names', ;; Use the first of these three environment variables ;; that has a nonempty value. (let ((vars '("LC_ALL" "LC_CTYPE" "LANG"))) - (while (and vars (not (setq locale (getenv (car vars))))) - (setq vars (cdr vars))))) + (while (and vars + (= 0 (length locale))) ; nil or empty string + (setq locale (getenv (pop vars)))))) (when locale |