aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/international
diff options
context:
space:
mode:
authorDave Love <[email protected]>2000-04-25 23:16:28 +0000
committerDave Love <[email protected]>2000-04-25 23:16:28 +0000
commit0d7c5bb95202395a7b56589a22f6db2402b55a9c (patch)
tree911be9202f7edcc9e550ea29c5496d307f81c69d /lisp/international
parent612839b6b20cf57f43480c38f89526c1febd6a28 (diff)
(locale-translation-file-name):
Defvar to nil. (set-locale-environment): Set it here (at runtime).
Diffstat (limited to 'lisp/international')
-rw-r--r--lisp/international/mule-cmds.el31
1 files changed, 18 insertions, 13 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 2128c9c68b..7aed2f9679 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -1461,19 +1461,8 @@ of buffer-file-coding-system set by this function."
;;; 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 @@ If LOCALE-NAME is nil, its value is taken from the environment.
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.