From dc8533549ecc3ac1b08dd5fb8f052fcff961ef0e Mon Sep 17 00:00:00 2001 From: Dave Love Date: Sun, 16 Jun 2002 11:44:10 +0000 Subject: [PATCH] (set-locale-environment): Use locale-codeset. --- lisp/ChangeLog | 5 +++++ lisp/international/mule-cmds.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b14c6197f62..9f2f5d54a47 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-06-16 Dave Love + + * international/mule-cmds.el (set-locale-environment): Use + locale-codeset. + 2002-06-15 Dave Love * language/cyrillic.el ("Belarusian"): Doc fix. diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 9c55deef3a3..d885be3dc77 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1866,8 +1866,10 @@ XX is a country, and CODE specifies a character set and coding system. For example, the locale name \"ja_JP.EUC\" might name a locale for Japanese in Japan using the `japanese-iso-8bit' coding-system. -If LOCALE-NAME is nil, its value is taken from the environment -variables LC_ALL, LC_CTYLE and LANG (the first one that is set). +If LOCALE-NAME is nil, its value is looked up via `locale-codeset' +using nl_langinfo(3), if that function is available in the system's +library, otherwise it is simply taken from the environment variables +LC_ALL, LC_CTYPE and LANG \(the first one that is set). The locale names supported by your system can typically be found in a directory named `/usr/share/locale' or `/usr/lib/locale'. LOCALE-NAME @@ -1894,7 +1896,7 @@ See also `locale-charset-language-names', `locale-language-names', (setq files (cdr files))) (car files))) - (let ((locale locale-name)) + (let ((locale (or locale-name (locale-codeset)))) (unless locale ;; Use the first of these three environment variables -- 2.39.2