changeset 48836:81333325d8f7

(current-language-environment): Set type according to `language-info-alist' also here.
author Markus Rost <rost@math.uni-bielefeld.de>
date Fri, 13 Dec 2002 22:41:40 +0000
parents 750e9e67d3e9
children 15dcdff64493
files lisp/international/mule-cmds.el
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/mule-cmds.el	Fri Dec 13 22:37:37 2002 +0000
+++ b/lisp/international/mule-cmds.el	Fri Dec 13 22:41:40 2002 +0000
@@ -1505,8 +1505,14 @@
 			  current-language-environment)
 			language-info-alist))
 	     "English"))
-  ;; a better custom type will be set with `set-language-info'.
-  :type 'string
+  ;; custom type will be updated with `set-language-info'.
+  :type (if language-info-alist
+	    (cons 'choice (mapcar
+			   (lambda (lang)
+			     (list 'const (car lang)))
+			   (sort (copy-sequence language-info-alist)
+				 (lambda (x y) (string< (car x) (car y))))))
+	  'string)
   :initialize 'custom-initialize-default
   :group 'mule)