aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1998-07-19 05:17:35 +0000
committerKenichi Handa1998-07-19 05:17:35 +0000
commit99848db078c238f6b640208160d39cf03f4020d1 (patch)
treecee9b5236ea21f215e5da1efaa604e37ccfde93c
parent277576f6bc8beca2b7a6f8809d7b1b97163b1132 (diff)
downloademacs-99848db078c238f6b640208160d39cf03f4020d1.tar.gz
emacs-99848db078c238f6b640208160d39cf03f4020d1.zip
(isearch-input-method-function): New variable.
(isearch-input-method-local-p): New variable. (isearch-mode): Setup the above two variable. Set input-method-function to nil locally. (isearch-done): Restore the previous value of input-method-function.
-rw-r--r--lisp/isearch.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index ec1f20abecb..1753dfcd8ff 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -387,6 +387,13 @@ Default value, nil, means edit the string instead."
387;; Accumulate here the overlays opened during searching. 387;; Accumulate here the overlays opened during searching.
388(defvar isearch-opened-overlays nil) 388(defvar isearch-opened-overlays nil)
389 389
390;; The value of input-method-function when isearch is invoked.
391(defvar isearch-input-method-function nil)
392
393;; A flag to tell if input-method-function is locally bound when
394;; isearch is invoked.
395(defvar isearch-input-method-local-p nil)
396
390;; Minor-mode-alist changes - kind of redundant with the 397;; Minor-mode-alist changes - kind of redundant with the
391;; echo area, but if isearching in multiple windows, it can be useful. 398;; echo area, but if isearching in multiple windows, it can be useful.
392 399
@@ -523,7 +530,17 @@ is treated as a regexp. See \\[isearch-forward] for more info."
523 isearch-opoint (point) 530 isearch-opoint (point)
524 search-ring-yank-pointer nil 531 search-ring-yank-pointer nil
525 isearch-opened-overlays nil 532 isearch-opened-overlays nil
533 isearch-input-method-function input-method-function
534 isearch-input-method-local-p (local-variable-p 'input-method-function)
526 regexp-search-ring-yank-pointer nil) 535 regexp-search-ring-yank-pointer nil)
536
537 ;; We must bypass input method while reading key. When a user type
538 ;; printable character, appropriate input method is turned on in
539 ;; minibuffer to read multibyte charactes.
540 (or isearch-input-method-local-p
541 (make-local-variable 'input-method-function))
542 (setq input-method-function nil)
543
527 (looking-at "") 544 (looking-at "")
528 (setq isearch-window-configuration 545 (setq isearch-window-configuration
529 (if isearch-slow-terminal-mode (current-window-configuration) nil)) 546 (if isearch-slow-terminal-mode (current-window-configuration) nil))
@@ -621,6 +638,10 @@ is treated as a regexp. See \\[isearch-forward] for more info."
621 (message "Mark saved where search started")))))) 638 (message "Mark saved where search started"))))))
622 639
623 (setq isearch-mode nil) 640 (setq isearch-mode nil)
641 (if isearch-input-method-local-p
642 (setq input-method-function isearch-input-method-function)
643 (kill-local-variable 'input-method-function))
644
624 (force-mode-line-update) 645 (force-mode-line-update)
625 646
626 (if (and (> (length isearch-string) 0) (not nopush)) 647 (if (and (> (length isearch-string) 0) (not nopush))