diff options
| author | Kenichi Handa | 1998-07-23 05:42:28 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-07-23 05:42:28 +0000 |
| commit | 07474fef28b4a621323810fcefdfce6ad48fe202 (patch) | |
| tree | 48a552a062b320128f2cfdf2634ef905fdd43703 | |
| parent | da55ad08c20355b5102a05530d0d5e28a6d54fe6 (diff) | |
| download | emacs-07474fef28b4a621323810fcefdfce6ad48fe202.tar.gz emacs-07474fef28b4a621323810fcefdfce6ad48fe202.zip | |
(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.
| -rw-r--r-- | lisp/international/isearch-x.el | 59 |
1 files changed, 32 insertions, 27 deletions
diff --git a/lisp/international/isearch-x.el b/lisp/international/isearch-x.el index 9291a5d929d..31546b50c37 100644 --- a/lisp/international/isearch-x.el +++ b/lisp/international/isearch-x.el | |||
| @@ -73,35 +73,40 @@ | |||
| 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 |