Mercurial > emacs
comparison lisp/international/mule-cmds.el @ 43252:bccb026d40e4
2002-02-12 Per Abrahamsen <abraham@dina.kvl.dk>
* menu-bar.el (menu-bar-options-save): Only save
`current-language-environment' and `default-input-method' when
marked as customized.
* international/mule-cmds.el
(setup-specified-language-environment): Mark
`current-language-environment' as customized.
(set-input-method): Mark
`default-input-method' as customized when called interactively.
(toggle-input-method): Ditto.
author | Per Abrahamsen <abraham@dina.kvl.dk> |
---|---|
date | Tue, 12 Feb 2002 09:49:46 +0000 |
parents | faaa5a3adc82 |
children | 93653d31963e |
comparison
equal
deleted
inserted
replaced
43251:3c634255d649 | 43252:bccb026d40e4 |
---|---|
1101 (let* ((default (or (car input-method-history) default-input-method))) | 1101 (let* ((default (or (car input-method-history) default-input-method))) |
1102 (list (read-input-method-name | 1102 (list (read-input-method-name |
1103 (if default "Select input method (default %s): " "Select input method: ") | 1103 (if default "Select input method (default %s): " "Select input method: ") |
1104 default t)))) | 1104 default t)))) |
1105 (activate-input-method input-method) | 1105 (activate-input-method input-method) |
1106 (setq default-input-method input-method)) | 1106 (setq default-input-method input-method) |
1107 (when (interactive-p) | |
1108 (customize-mark-as-set 'default-input-method)) | |
1109 default-input-method) | |
1107 | 1110 |
1108 (defun toggle-input-method (&optional arg) | 1111 (defun toggle-input-method (&optional arg) |
1109 "Enable or disable multilingual text input method for the current buffer. | 1112 "Enable or disable multilingual text input method for the current buffer. |
1110 Only one input method can be enabled at any time in a given buffer. | 1113 Only one input method can be enabled at any time in a given buffer. |
1111 | 1114 |
1132 (progn | 1135 (progn |
1133 (read-input-method-name | 1136 (read-input-method-name |
1134 (if default "Input method (default %s): " "Input method: " ) | 1137 (if default "Input method (default %s): " "Input method: " ) |
1135 default t)) | 1138 default t)) |
1136 default)) | 1139 default)) |
1137 (or default-input-method | 1140 (unless default-input-method |
1138 (setq default-input-method current-input-method))))) | 1141 (prog1 |
1142 (setq default-input-method current-input-method) | |
1143 (when (interactive-p) | |
1144 (customize-mark-as-set 'default-input-method))))))) | |
1139 | 1145 |
1140 (defun describe-input-method (input-method) | 1146 (defun describe-input-method (input-method) |
1141 "Describe input method INPUT-METHOD." | 1147 "Describe input method INPUT-METHOD." |
1142 (interactive | 1148 (interactive |
1143 (list (read-input-method-name | 1149 (list (read-input-method-name |
1295 (let (language-name) | 1301 (let (language-name) |
1296 (if (and (symbolp last-command-event) | 1302 (if (and (symbolp last-command-event) |
1297 (or (not (eq last-command-event 'Default)) | 1303 (or (not (eq last-command-event 'Default)) |
1298 (setq last-command-event 'English)) | 1304 (setq last-command-event 'English)) |
1299 (setq language-name (symbol-name last-command-event))) | 1305 (setq language-name (symbol-name last-command-event))) |
1300 (set-language-environment language-name) | 1306 (prog1 |
1307 (set-language-environment language-name) | |
1308 (customize-mark-as-set 'current-language-environment)) | |
1301 (error "Bogus calling sequence")))) | 1309 (error "Bogus calling sequence")))) |
1302 | 1310 |
1303 (defcustom current-language-environment "English" | 1311 (defcustom current-language-environment "English" |
1304 "The last language environment specified with `set-language-environment'. | 1312 "The last language environment specified with `set-language-environment'. |
1305 This variable should be set only with \\[customize], which is equivalent | 1313 This variable should be set only with \\[customize], which is equivalent |