changeset 28711:039f763895c3

(locale-translation-file-name): Defvar to nil. (set-locale-environment): Set it here (at runtime).
author Dave Love <fx@gnu.org>
date Tue, 25 Apr 2000 23:15:52 +0000
parents 6efaa4627dee
children fe95c07fed40
files lisp/international/mule-cmds.el
diffstat 1 files changed, 18 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Tue Apr 25 19:43:58 2000 +0000
+++ b/lisp/international/mule-cmds.el	Tue Apr 25 23:15:52 2000 +0000
@@ -1461,19 +1461,8 @@
 
 ;;; Locales.
 
-(defvar locale-translation-file-name
-  (let ((files '("/usr/lib/X11/locale/locale.alias" ; e.g. X11R6.4
-		 "/usr/X11R6/lib/X11/locale/locale.alias" ; e.g. RedHat 4.2
-		 "/usr/openwin/lib/locale/locale.alias" ; e.g. Solaris 2.6
-		 ;;
-		 ;; The following name appears after the X-related names above,
-		 ;; since the X-related names are what X actually uses.
-		 "/usr/share/locale/locale.alias" ; GNU/Linux sans X
-		 )))
-    (while (and files (not (file-exists-p (car files))))
-      (setq files (cdr files)))
-    (car files))
-  "*File name for the system's file of locale-name aliases, or nil if none.")
+(defvar locale-translation-file-name nil
+  "File name for the system's file of locale-name aliases, or nil if none.")
 
 (defvar locale-language-names
   '(
@@ -1705,6 +1694,22 @@
 The locale names supported by your system can typically be found in a
 directory named `/usr/share/locale' or `/usr/lib/locale'."
 
+  ;; Do this at runtime for the sake of binaries possibly transported
+  ;; to a system without X.
+  (setq locale-translation-file-name
+	(let ((files
+	       '("/usr/lib/X11/locale/locale.alias" ; e.g. X11R6.4
+		 "/usr/X11R6/lib/X11/locale/locale.alias" ; e.g. RedHat 4.2
+		 "/usr/openwin/lib/locale/locale.alias" ; e.g. Solaris 2.6
+		 ;;
+		 ;; The following name appears after the X-related names above,
+		 ;; since the X-related names are what X actually uses.
+		 "/usr/share/locale/locale.alias" ; GNU/Linux sans X
+		 )))
+	  (while (and files (not (file-exists-p (car files))))
+	    (setq files (cdr files)))
+	  (car files)))
+
   (unless locale-name
     ;; Use the first of these three environment variables
     ;; that has a nonempty value.