From db6bd804adccc378d20706ef5ec7494e983968d2 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Sun, 5 Jan 2003 00:38:05 +0000 Subject: [PATCH] (set-locale-environment): Ignore empty values of environment variables. --- lisp/international/mule-cmds.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.2