Mercurial > emacs
comparison lisp/international/isearch-x.el @ 22803:c52637c83ebf
(isearch-minibuffer-self-insert):
Handle space char event correctly.
(isearch-process-search-multibyte-characters): If this-command is
not isearch-printing-char, don't read multibyte chars from
minibuffer, but just call isearch-process-search-char.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Thu, 23 Jul 1998 05:42:28 +0000 |
parents | 54069d469c31 |
children | f80a1ca0112f |
comparison
equal
deleted
inserted
replaced
22802:441f052f49f7 | 22803:c52637c83ebf |
---|---|
71 (setq unread-command-events (cons last-command-event unread-command-events)) | 71 (setq unread-command-events (cons last-command-event unread-command-events)) |
72 (exit-minibuffer)) | 72 (exit-minibuffer)) |
73 | 73 |
74 (defun isearch-minibuffer-self-insert () | 74 (defun isearch-minibuffer-self-insert () |
75 (interactive) | 75 (interactive) |
76 (setq unread-command-events (cons last-command-event unread-command-events)) | 76 (let ((events (cons last-command-event unread-post-input-method-events))) |
77 (let ((continue t) | 77 (catch 'isearch-tag |
78 event) | 78 (while events |
79 (while continue | 79 (let* ((event (car events)) |
80 (setq event (car unread-command-events)) | 80 (cmd (lookup-key isearch-mode-map (vector event)))) |
81 (if (eq (lookup-key isearch-mode-map (vector event)) | 81 (cond ((eq cmd 'isearch-printing-char) |
82 'isearch-printing-char) | 82 (insert event) |
83 (progn | 83 (setq events (cdr events))) |
84 (insert event) | 84 ((eq cmd 'exit-minibuffer) |
85 (setq unread-command-events (cdr unread-command-events))) | 85 (setq events (cdr events)) |
86 (setq continue nil)))) | 86 (throw 'isearch-tag nil)) |
87 (or unread-command-events | 87 (t |
88 (exit-minibuffer))) | 88 (throw 'isearch-tag nil)))))) |
89 (setq unread-post-input-method-events events) | |
90 (or unread-post-input-method-events | |
91 (exit-minibuffer)))) | |
89 | 92 |
90 ;;;###autoload | 93 ;;;###autoload |
91 (defun isearch-process-search-multibyte-characters (last-char) | 94 (defun isearch-process-search-multibyte-characters (last-char) |
92 (let ((overriding-terminal-local-map nil) | 95 (if (eq this-command 'isearch-printing-char) |
93 ;; Let input method work rather tersely. | 96 (let ((overriding-terminal-local-map nil) |
94 (input-method-verbose-flag nil) | 97 ;; Let input method work rather tersely. |
95 (minibuffer-local-map isearch-minibuffer-local-map) | 98 (input-method-verbose-flag nil) |
96 str) | 99 (minibuffer-local-map isearch-minibuffer-local-map) |
97 (setq unread-input-method-events | 100 str) |
98 (cons last-char unread-input-method-events)) | 101 (setq unread-input-method-events |
99 (setq str (read-multilingual-string | 102 (cons last-char unread-input-method-events)) |
100 (concat (isearch-message-prefix) isearch-message) | 103 (setq str (read-multilingual-string |
101 nil | 104 (concat (isearch-message-prefix) isearch-message) |
102 current-input-method)) | 105 nil |
103 (if (and str (> (length str) 0)) | 106 current-input-method)) |
104 (isearch-process-search-string str str) | 107 (if (and str (> (length str) 0)) |
105 (isearch-update)))) | 108 (isearch-process-search-string str str) |
109 (isearch-update))) | |
110 (isearch-process-search-char last-char))) | |
106 | 111 |
107 ;;; isearch-x.el ends here | 112 ;;; isearch-x.el ends here |