diff options
| author | Markus Rost | 2002-12-11 21:29:31 +0000 |
|---|---|---|
| committer | Markus Rost | 2002-12-11 21:29:31 +0000 |
| commit | 590dbcbaa6a2e1a06a589e2ba779c50c5a855e5b (patch) | |
| tree | 820f0001c96235e464fbf557896ad890cc2e9fac | |
| parent | 59adf8e8e9e830b3fb1a57895d3822c63fa8961b (diff) | |
| download | emacs-590dbcbaa6a2e1a06a589e2ba779c50c5a855e5b.tar.gz emacs-590dbcbaa6a2e1a06a589e2ba779c50c5a855e5b.zip | |
(current-language-environment-custom-type): New fun.
(set-language-info): Use it.
(current-language-environment): Fix custom type.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/international/mule-cmds.el | 16 |
2 files changed, 19 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6453121bebc..6fd33f093d4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2002-12-11 Markus Rost <rost@math.ohio-state.edu> | ||
| 2 | |||
| 3 | * international/mule-cmds.el | ||
| 4 | (current-language-environment-custom-type): New fun. | ||
| 5 | (set-language-info): Use it. | ||
| 6 | (current-language-environment): Fix custom type. | ||
| 7 | |||
| 1 | 2002-12-11 Pavel Jan,Bm(Bk <Pavel@Janik.cz> | 8 | 2002-12-11 Pavel Jan,Bm(Bk <Pavel@Janik.cz> |
| 2 | 9 | ||
| 3 | * progmodes/antlr-mode.el (antlr): New URL. | 10 | * progmodes/antlr-mode.el (antlr): New URL. |
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index aa33a39352b..3d824de6b46 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el | |||
| @@ -985,7 +985,9 @@ see `language-info-alist'." | |||
| 985 | (progn | 985 | (progn |
| 986 | (setq key-slot (list key)) | 986 | (setq key-slot (list key)) |
| 987 | (setcdr lang-slot (cons key-slot (cdr lang-slot))))) | 987 | (setcdr lang-slot (cons key-slot (cdr lang-slot))))) |
| 988 | (setcdr key-slot (purecopy info)))) | 988 | (setcdr key-slot (purecopy info)) |
| 989 | (put 'current-language-environment 'custom-type | ||
| 990 | (current-language-environment-custom-type)))) | ||
| 989 | 991 | ||
| 990 | (defun set-language-info-alist (lang-env alist &optional parents) | 992 | (defun set-language-info-alist (lang-env alist &optional parents) |
| 991 | "Store ALIST as the definition of language environment LANG-ENV. | 993 | "Store ALIST as the definition of language environment LANG-ENV. |
| @@ -1485,6 +1487,13 @@ This hook is mainly used for canceling the effect of | |||
| 1485 | (customize-mark-as-set 'current-language-environment)) | 1487 | (customize-mark-as-set 'current-language-environment)) |
| 1486 | (error "Bogus calling sequence")))) | 1488 | (error "Bogus calling sequence")))) |
| 1487 | 1489 | ||
| 1490 | (defun current-language-environment-custom-type () | ||
| 1491 | "Return a custom type for `current-language-environment'. | ||
| 1492 | This is based on `language-info-alist'." | ||
| 1493 | (cons 'choice (mapcar (lambda (lang) | ||
| 1494 | (list 'const (car lang))) | ||
| 1495 | language-info-alist))) | ||
| 1496 | |||
| 1488 | (defcustom current-language-environment "English" | 1497 | (defcustom current-language-environment "English" |
| 1489 | "The last language environment specified with `set-language-environment'. | 1498 | "The last language environment specified with `set-language-environment'. |
| 1490 | This variable should be set only with \\[customize], which is equivalent | 1499 | This variable should be set only with \\[customize], which is equivalent |
| @@ -1498,9 +1507,8 @@ to using the function `set-language-environment'." | |||
| 1498 | current-language-environment) | 1507 | current-language-environment) |
| 1499 | language-info-alist)) | 1508 | language-info-alist)) |
| 1500 | "English")) | 1509 | "English")) |
| 1501 | :type (cons 'choice (mapcar (lambda (lang) | 1510 | ;; a better custom type will be set with `set-language-info'. |
| 1502 | (list 'const (car lang))) | 1511 | :type 'string |
| 1503 | language-info-alist)) | ||
| 1504 | :initialize 'custom-initialize-default | 1512 | :initialize 'custom-initialize-default |
| 1505 | :group 'mule) | 1513 | :group 'mule) |
| 1506 | 1514 | ||