From: Dave Love Date: Sun, 5 Jan 2003 00:38:05 +0000 (+0000) Subject: (set-locale-environment): Ignore X-Git-Tag: ttn-vms-21-2-B4~11840 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=db6bd804adccc378d20706ef5ec7494e983968d2;p=emacs.git (set-locale-environment): Ignore empty values of environment variables. --- diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index c70fa7a43a5..0e6f74d200c 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