Commits

Anonymous committed ad85a43

Sync liece/lisp/gettext.el to the latest upstream version.

  • Participants
  • Parent commits 9c7ad57

Comments (0)

Files changed (2)

+2002-05-12  Daiki Ueno  <ueno@unixuser.org>
+
+	* gettext.el (gettext-default-locale): New variable.
+	(bind-text-domain): Use it.
+
+2002-05-07  Daiki Ueno  <ueno@unixuser.org>
+
+	* gettext.el (gettext-mapcar*): Eliminate recursion.
+
 2002-04-08  Daiki Ueno  <daiki@xemacs.org>
 
 	* liece-misc.el: Don't require pccl and broken.
 (defvar gettext-message-domain-to-catalog-alist nil)
 (defvar gettext-default-message-domain "emacs")
 (defvar gettext-default-mime-charset default-mime-charset)
+(defvar gettext-default-locale "C")
 
 (defconst gettext-msgid-regexp "msgid\\s-*\"")
 (defconst gettext-msgstr-regexp "msgstr\\s-*\"")
 (defun gettext-mapcar* (function &rest args)
   "Apply FUNCTION to successive cars of all ARGS.
 Return the list of results."
-  (unless (memq nil args)
-    (cons (apply function (mapcar #'car args))
-	  (apply #'gettext-mapcar* function
-		 (mapcar #'cdr args)))))
+  (let (result)
+    (while (not (memq nil args))
+      (push (apply function (mapcar #'car args)) result)
+      (setq args (mapcar #'cdr args)))
+    (nreverse result)))
 
 (defun gettext-load-message-catalogue (file)
   (with-temp-buffer
 Here's how the path to message files is constructed under SunOS 5.0:
   {pathname}/{LANG}/LC_MESSAGES/{domain}.mo
 \[XEmacs I18N level 3 emulating function]"
-    (let* ((lang (or (getenv "LC_ALL") (getenv "LC_MESSAGES") (getenv "LANG")))
+    (let* ((lang (or (getenv "LC_ALL") (getenv "LC_MESSAGES") (getenv "LANG")
+		     gettext-default-locale))
 	   (language (progn
 		       (string-match "\\([^_.]+\\)\\(_[^.]+\\)?\\(\\.[^@]+\\)?"
 				     lang)