changeset 88769:9714c10f165d

(set-locale-environment): Use locale-codeset.
author Dave Love <fx@gnu.org>
date Sun, 16 Jun 2002 11:43:54 +0000
parents f91d6a22179b
children 7df1e731d256
files lisp/international/mule-cmds.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Fri Jun 14 23:23:39 2002 +0000
+++ b/lisp/international/mule-cmds.el	Sun Jun 16 11:43:54 2002 +0000
@@ -1866,8 +1866,10 @@
 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 @@
 	    (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