aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1997-10-21 10:47:35 +0000
committerKenichi Handa1997-10-21 10:47:35 +0000
commitd34596414ea64e1009c1d785f83d10e9bde67be8 (patch)
tree1634aba38e5d3ef675f88468d5b77cd7e26c05cd
parent3fcbab9a4977076d2d9277346441970363281501 (diff)
downloademacs-d34596414ea64e1009c1d785f83d10e9bde67be8.tar.gz
emacs-d34596414ea64e1009c1d785f83d10e9bde67be8.zip
(read-multilingual-string): Use
current-input-method prior to default-input-method. Don't bind current-input-method by `let', instead, activate the specified input method in the current buffer temporarily.
-rw-r--r--lisp/international/mule-cmds.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index af6aaf03955..fa02eb71aaa 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -549,8 +549,7 @@ When there's no input method to turn on, turn on what read from minibuffer."
549 (ding)) 549 (ding))
550 (error "No input method is activated now"))) 550 (error "No input method is activated now")))
551 551
552(defun read-multilingual-string (prompt &optional initial-input 552(defun read-multilingual-string (prompt &optional initial-input input-method)
553 input-method)
554 "Read a multilingual string from minibuffer, prompting with string PROMPT. 553 "Read a multilingual string from minibuffer, prompting with string PROMPT.
555The input method selected last time is activated in minibuffer. 554The input method selected last time is activated in minibuffer.
556If optional second arg INITIAL-INPUT is non-nil, insert it in the minibuffer 555If optional second arg INITIAL-INPUT is non-nil, insert it in the minibuffer
@@ -560,12 +559,19 @@ to be activated instead of the one selected last time. It is a symbol
560or a string." 559or a string."
561 (setq input-method 560 (setq input-method
562 (or input-method 561 (or input-method
562 current-input-method
563 default-input-method 563 default-input-method
564 (read-input-method-name "Input method: " nil t))) 564 (read-input-method-name "Input method: " nil t)))
565 (if (and input-method (symbolp input-method)) 565 (if (and input-method (symbolp input-method))
566 (setq input-method (symbol-name input-method))) 566 (setq input-method (symbol-name input-method)))
567 (let ((current-input-method input-method)) 567 (let ((previous-input-method current-input-method))
568 (read-string prompt initial-input nil nil t))) 568 (unwind-protect
569 (progn
570 (activate-input-method input-method)
571 (read-string prompt initial-input nil nil t))
572 (if previous-input-method
573 (activate-input-method previous-input-method)
574 (inactivate-input-method)))))
569 575
570;; Variables to control behavior of input methods. All input methods 576;; Variables to control behavior of input methods. All input methods
571;; should react to these variables. 577;; should react to these variables.