]> git.eshelyaron.com Git - emacs.git/commitdiff
(set-locale-environment): Use
authorDave Love <fx@gnu.org>
Sun, 16 Jun 2002 11:44:10 +0000 (11:44 +0000)
committerDave Love <fx@gnu.org>
Sun, 16 Jun 2002 11:44:10 +0000 (11:44 +0000)
locale-codeset.

lisp/ChangeLog
lisp/international/mule-cmds.el

index b14c6197f62f63d3a4f8b3b9ea60954f77e96e28..9f2f5d54a4711afea225f5332e7d5de25424df82 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-16  Dave Love  <fx@gnu.org>
+
+       * international/mule-cmds.el (set-locale-environment): Use
+       locale-codeset.
+
 2002-06-15  Dave Love  <fx@gnu.org>
 
        * language/cyrillic.el ("Belarusian"): Doc fix.
index 9c55deef3a32990e40ef0314a04c41e8ccdc6378..d885be3dc779db31ba05ed3b05035e120301dd37 100644 (file)
@@ -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