diff options
author | Markus Rost <[email protected]> | 2002-12-11 21:29:31 +0000 |
---|---|---|
committer | Markus Rost <[email protected]> | 2002-12-11 21:29:31 +0000 |
commit | 590dbcbaa6a2e1a06a589e2ba779c50c5a855e5b (patch) | |
tree | 820f0001c96235e464fbf557896ad890cc2e9fac /lisp/international/mule-cmds.el | |
parent | 59adf8e8e9e830b3fb1a57895d3822c63fa8961b (diff) |
(current-language-environment-custom-type): New fun.
(set-language-info): Use it.
(current-language-environment): Fix custom type.
Diffstat (limited to 'lisp/international/mule-cmds.el')
-rw-r--r-- | lisp/international/mule-cmds.el | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index aa33a39352..3d824de6b4 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -985,7 +985,9 @@ see `language-info-alist'." (progn (setq key-slot (list key)) (setcdr lang-slot (cons key-slot (cdr lang-slot))))) - (setcdr key-slot (purecopy info)))) + (setcdr key-slot (purecopy info)) + (put 'current-language-environment 'custom-type + (current-language-environment-custom-type)))) (defun set-language-info-alist (lang-env alist &optional parents) "Store ALIST as the definition of language environment LANG-ENV. @@ -1485,6 +1487,13 @@ This hook is mainly used for canceling the effect of (customize-mark-as-set 'current-language-environment)) (error "Bogus calling sequence")))) +(defun current-language-environment-custom-type () + "Return a custom type for `current-language-environment'. +This is based on `language-info-alist'." + (cons 'choice (mapcar (lambda (lang) + (list 'const (car lang))) + language-info-alist))) + (defcustom current-language-environment "English" "The last language environment specified with `set-language-environment'. This variable should be set only with \\[customize], which is equivalent @@ -1498,9 +1507,8 @@ to using the function `set-language-environment'." current-language-environment) language-info-alist)) "English")) - :type (cons 'choice (mapcar (lambda (lang) - (list 'const (car lang))) - language-info-alist)) + ;; a better custom type will be set with `set-language-info'. + :type 'string :initialize 'custom-initialize-default :group 'mule) |