1368 |
current-input-method-title nil) |
current-input-method-title nil) |
1369 |
(force-mode-line-update))))) |
(force-mode-line-update))))) |
1370 |
|
|
1371 |
(defun set-input-method (input-method) |
(defun set-input-method (input-method &optional interactive) |
1372 |
"Select and activate input method INPUT-METHOD for the current buffer. |
"Select and activate input method INPUT-METHOD for the current buffer. |
1373 |
This also sets the default input method to the one you specify. |
This also sets the default input method to the one you specify. |
1374 |
If INPUT-METHOD is nil, this function turns off the input method, and |
If INPUT-METHOD is nil, this function turns off the input method, and |
1375 |
also causes you to be prompted for a name of an input method the next |
also causes you to be prompted for a name of an input method the next |
1376 |
time you invoke \\[toggle-input-method]. |
time you invoke \\[toggle-input-method]. |
1377 |
|
When called interactively, the optional arg INTERACTIVE is non-nil, |
1378 |
|
which marks the variable `default-input-method' as set for Custom buffers. |
1379 |
|
|
1380 |
To deactivate the input method interactively, use \\[toggle-input-method]. |
To deactivate the input method interactively, use \\[toggle-input-method]. |
1381 |
To deactivate it programmatically, use \\[inactivate-input-method]." |
To deactivate it programmatically, use \\[inactivate-input-method]." |
1383 |
(let* ((default (or (car input-method-history) default-input-method))) |
(let* ((default (or (car input-method-history) default-input-method))) |
1384 |
(list (read-input-method-name |
(list (read-input-method-name |
1385 |
(if default "Select input method (default %s): " "Select input method: ") |
(if default "Select input method (default %s): " "Select input method: ") |
1386 |
default t)))) |
default t) |
1387 |
|
t))) |
1388 |
(activate-input-method input-method) |
(activate-input-method input-method) |
1389 |
(setq default-input-method input-method) |
(setq default-input-method input-method) |
1390 |
(when (interactive-p) |
(when interactive |
1391 |
(customize-mark-as-set 'default-input-method)) |
(customize-mark-as-set 'default-input-method)) |
1392 |
default-input-method) |
default-input-method) |
1393 |
|
|
1394 |
(defun toggle-input-method (&optional arg) |
(defun toggle-input-method (&optional arg interactive) |
1395 |
"Enable or disable multilingual text input method for the current buffer. |
"Enable or disable multilingual text input method for the current buffer. |
1396 |
Only one input method can be enabled at any time in a given buffer. |
Only one input method can be enabled at any time in a given buffer. |
1397 |
|
|
1404 |
|
|
1405 |
With a prefix argument, read an input method name with the minibuffer |
With a prefix argument, read an input method name with the minibuffer |
1406 |
and enable that one. The default is the most recent input method specified |
and enable that one. The default is the most recent input method specified |
1407 |
\(not including the currently active input method, if any)." |
\(not including the currently active input method, if any). |
1408 |
|
|
1409 |
(interactive "P") |
When called interactively, the optional arg INTERACTIVE is non-nil, |
1410 |
|
which marks the variable `default-input-method' as set for Custom buffers." |
1411 |
|
|
1412 |
|
(interactive "P\np") |
1413 |
(if (and current-input-method (not arg)) |
(if (and current-input-method (not arg)) |
1414 |
(inactivate-input-method) |
(inactivate-input-method) |
1415 |
(let ((default (or (car input-method-history) default-input-method))) |
(let ((default (or (car input-method-history) default-input-method))) |
1426 |
(unless default-input-method |
(unless default-input-method |
1427 |
(prog1 |
(prog1 |
1428 |
(setq default-input-method current-input-method) |
(setq default-input-method current-input-method) |
1429 |
(when (interactive-p) |
(when interactive |
1430 |
(customize-mark-as-set 'default-input-method))))))) |
(customize-mark-as-set 'default-input-method))))))) |
1431 |
|
|
1432 |
(defun describe-input-method (input-method) |
(defun describe-input-method (input-method) |