# HG changeset patch # User Kenichi Handa # Date 877430855 0 # Node ID 8c1995cc7702a708ba50b3ca5acce19a64eefe62 # Parent 99b8a866c50a8a2632dfaad1cdcf37caf6467ea0 (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. diff -r 99b8a866c50a -r 8c1995cc7702 lisp/international/mule-cmds.el --- a/lisp/international/mule-cmds.el Tue Oct 21 10:47:35 1997 +0000 +++ b/lisp/international/mule-cmds.el Tue Oct 21 10:47:35 1997 +0000 @@ -549,8 +549,7 @@ (ding)) (error "No input method is activated now"))) -(defun read-multilingual-string (prompt &optional initial-input - input-method) +(defun read-multilingual-string (prompt &optional initial-input input-method) "Read a multilingual string from minibuffer, prompting with string PROMPT. The input method selected last time is activated in minibuffer. If optional second arg INITIAL-INPUT is non-nil, insert it in the minibuffer @@ -560,12 +559,19 @@ or a string." (setq input-method (or input-method + current-input-method default-input-method (read-input-method-name "Input method: " nil t))) (if (and input-method (symbolp input-method)) (setq input-method (symbol-name input-method))) - (let ((current-input-method input-method)) - (read-string prompt initial-input nil nil t))) + (let ((previous-input-method current-input-method)) + (unwind-protect + (progn + (activate-input-method input-method) + (read-string prompt initial-input nil nil t)) + (if previous-input-method + (activate-input-method previous-input-method) + (inactivate-input-method))))) ;; Variables to control behavior of input methods. All input methods ;; should react to these variables.