changeset 19407:50444ccff3f2

(isearch-input-method): Deleted. (isearch-input-method-title): Deleted. (isearch-toggle-specified-input-method): Call toggle-input-method. (isearch-toggle-input-method): Likewise. (isearch-process-search-multibyte-characters): Use current-input-method instead of isearch-input-method.
author Kenichi Handa <handa@m17n.org>
date Mon, 18 Aug 1997 10:51:45 +0000
parents 0933bf4b82c9
children 7457b6e05a60
files lisp/international/isearch-x.el
diffstat 1 files changed, 11 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/isearch-x.el	Mon Aug 18 10:51:45 1997 +0000
+++ b/lisp/international/isearch-x.el	Mon Aug 18 10:51:45 1997 +0000
@@ -28,53 +28,38 @@
 ;;; Code:
 
 ;;;###autoload
-(defvar isearch-input-method nil
-  "Input method activated in interactive search.")
-
-(defvar isearch-input-method-title nil
-  "Title string of input method activated in interactive search.")
-
-;;;###autoload
 (defun isearch-toggle-specified-input-method ()
   "Select an input method and turn it on in interactive search."
   (interactive)
-  (setq isearch-input-method nil)
-  (let ((default-input-method nil))
-    (isearch-toggle-input-method)))
+  (let ((overriding-terminal-local-map nil))
+    (toggle-input-method t))
+  (isearch-update))
 
 ;;;###autoload
 (defun isearch-toggle-input-method ()
   "Toggle input method in interactive search."
   (interactive)
-  (if isearch-input-method
-      (setq isearch-input-method nil)
-    (setq isearch-input-method
-	  (or default-input-method
-	      (let ((overriding-terminal-local-map nil))
-		(read-input-method-name "Input method: "))))
-    (if isearch-input-method
-	(setq isearch-input-method-title
-	      (nth 3 (assoc isearch-input-method input-method-alist)))
-      (ding)))
+  (let ((overriding-terminal-local-map nil))
+    (toggle-input-method))
   (isearch-update))
 
-(defun isearch-input-method-after-insert-chunk-function ()
-  (funcall inactivate-current-input-method-function))
-
+;;;###autoload
 (defun isearch-process-search-multibyte-characters (last-char)
   (let ((overriding-terminal-local-map nil)
 	;; Let input method exit when a chunk is inserted.
-	(input-method-after-insert-chunk-hook
-	 '(isearch-input-method-after-insert-chunk-function))
+	(input-method-after-insert-chunk-hook '(inactivate-input-method))
 	(input-method-inactivate-hook '(exit-minibuffer))
 	;; Let input method work rather tersely.
 	(input-method-verbose-flag nil)
+	;; A key not handled by the current input method should
+	;; terminate the input method.
+	(input-method-exit-on-invalid-key t)
 	str)
     (setq unread-command-events (cons last-char unread-command-events))
     (setq str (read-multilingual-string
 	       (concat (isearch-message-prefix) isearch-message)
 	       nil
-	       isearch-input-method))
+	       current-input-method))
     (isearch-process-search-string str str)))
 
 ;;; isearch-x.el ends here