aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2004-11-04 10:10:35 +0000
committerRichard M. Stallman2004-11-04 10:10:35 +0000
commite893eae2cb38b308ecf73e610f030ee0bfc7e32a (patch)
tree3a3b05b4041ca3f97877d1c86974ae9da7d4ccbf
parentba5037ec091f7b251c43953a63eb351e7798f7cb (diff)
downloademacs-e893eae2cb38b308ecf73e610f030ee0bfc7e32a.tar.gz
emacs-e893eae2cb38b308ecf73e610f030ee0bfc7e32a.zip
(set-input-method, toggle-input-method):
Don't use interactive-p. Add arg INTERACTIVE.
-rw-r--r--lisp/international/mule-cmds.el20
1 files changed, 13 insertions, 7 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 0d4abab120c..448144d6b28 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -1368,12 +1368,14 @@ If INPUT-METHOD is nil, deactivate any current input method."
1368 current-input-method-title nil) 1368 current-input-method-title nil)
1369 (force-mode-line-update))))) 1369 (force-mode-line-update)))))
1370 1370
1371(defun set-input-method (input-method) 1371(defun set-input-method (input-method &optional interactive)
1372 "Select and activate input method INPUT-METHOD for the current buffer. 1372 "Select and activate input method INPUT-METHOD for the current buffer.
1373This also sets the default input method to the one you specify. 1373This also sets the default input method to the one you specify.
1374If INPUT-METHOD is nil, this function turns off the input method, and 1374If INPUT-METHOD is nil, this function turns off the input method, and
1375also causes you to be prompted for a name of an input method the next 1375also causes you to be prompted for a name of an input method the next
1376time you invoke \\[toggle-input-method]. 1376time you invoke \\[toggle-input-method].
1377When called interactively, the optional arg INTERACTIVE is non-nil,
1378which marks the variable `default-input-method' as set for Custom buffers.
1377 1379
1378To deactivate the input method interactively, use \\[toggle-input-method]. 1380To deactivate the input method interactively, use \\[toggle-input-method].
1379To deactivate it programmatically, use \\[inactivate-input-method]." 1381To deactivate it programmatically, use \\[inactivate-input-method]."
@@ -1381,14 +1383,15 @@ To deactivate it programmatically, use \\[inactivate-input-method]."
1381 (let* ((default (or (car input-method-history) default-input-method))) 1383 (let* ((default (or (car input-method-history) default-input-method)))
1382 (list (read-input-method-name 1384 (list (read-input-method-name
1383 (if default "Select input method (default %s): " "Select input method: ") 1385 (if default "Select input method (default %s): " "Select input method: ")
1384 default t)))) 1386 default t)
1387 t)))
1385 (activate-input-method input-method) 1388 (activate-input-method input-method)
1386 (setq default-input-method input-method) 1389 (setq default-input-method input-method)
1387 (when (interactive-p) 1390 (when interactive
1388 (customize-mark-as-set 'default-input-method)) 1391 (customize-mark-as-set 'default-input-method))
1389 default-input-method) 1392 default-input-method)
1390 1393
1391(defun toggle-input-method (&optional arg) 1394(defun toggle-input-method (&optional arg interactive)
1392 "Enable or disable multilingual text input method for the current buffer. 1395 "Enable or disable multilingual text input method for the current buffer.
1393Only one input method can be enabled at any time in a given buffer. 1396Only one input method can be enabled at any time in a given buffer.
1394 1397
@@ -1401,9 +1404,12 @@ minibuffer.
1401 1404
1402With a prefix argument, read an input method name with the minibuffer 1405With a prefix argument, read an input method name with the minibuffer
1403and enable that one. The default is the most recent input method specified 1406and enable that one. The default is the most recent input method specified
1404\(not including the currently active input method, if any)." 1407\(not including the currently active input method, if any).
1405 1408
1406 (interactive "P") 1409When called interactively, the optional arg INTERACTIVE is non-nil,
1410which marks the variable `default-input-method' as set for Custom buffers."
1411
1412 (interactive "P\np")
1407 (if (and current-input-method (not arg)) 1413 (if (and current-input-method (not arg))
1408 (inactivate-input-method) 1414 (inactivate-input-method)
1409 (let ((default (or (car input-method-history) default-input-method))) 1415 (let ((default (or (car input-method-history) default-input-method)))
@@ -1420,7 +1426,7 @@ and enable that one. The default is the most recent input method specified
1420 (unless default-input-method 1426 (unless default-input-method
1421 (prog1 1427 (prog1
1422 (setq default-input-method current-input-method) 1428 (setq default-input-method current-input-method)
1423 (when (interactive-p) 1429 (when interactive
1424 (customize-mark-as-set 'default-input-method))))))) 1430 (customize-mark-as-set 'default-input-method)))))))
1425 1431
1426(defun describe-input-method (input-method) 1432(defun describe-input-method (input-method)