diff options
| author | Kenichi Handa | 1998-08-06 05:38:11 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-08-06 05:38:11 +0000 |
| commit | bbb398a13f9a3c91029f5756c8d86fa9691f4c08 (patch) | |
| tree | 980f60085bcde873569b965f23529643167015ea | |
| parent | f12d44e5ae4146d21ebb36c990032efded1c3178 (diff) | |
| download | emacs-bbb398a13f9a3c91029f5756c8d86fa9691f4c08.tar.gz emacs-bbb398a13f9a3c91029f5756c8d86fa9691f4c08.zip | |
(isearch-minibuffer-local-map): Bind
the key C-g to exit.
(isearch-minibuffer-self-insert): Use key-binding. Always call
exit-minibuffer.
(isearch-process-search-multibyte-characters): Use
unread-command-events instead of unread-input-method-events.
Always call isearch-update.
| -rw-r--r-- | lisp/international/isearch-x.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/international/isearch-x.el b/lisp/international/isearch-x.el index 31546b50c37..33081821514 100644 --- a/lisp/international/isearch-x.el +++ b/lisp/international/isearch-x.el | |||
| @@ -63,6 +63,7 @@ | |||
| 63 | (setq l (cdr l)))) | 63 | (setq l (cdr l)))) |
| 64 | (define-key map "\C-m" 'exit-minibuffer) | 64 | (define-key map "\C-m" 'exit-minibuffer) |
| 65 | (define-key map [return] 'exit-minibuffer) | 65 | (define-key map [return] 'exit-minibuffer) |
| 66 | (define-key map "\C-g" 'exit-minibuffer) | ||
| 66 | map) | 67 | map) |
| 67 | "Keymap of minibuffer to input multibyte characters while isearching.") | 68 | "Keymap of minibuffer to input multibyte characters while isearching.") |
| 68 | 69 | ||
| @@ -77,8 +78,9 @@ | |||
| 77 | (catch 'isearch-tag | 78 | (catch 'isearch-tag |
| 78 | (while events | 79 | (while events |
| 79 | (let* ((event (car events)) | 80 | (let* ((event (car events)) |
| 80 | (cmd (lookup-key isearch-mode-map (vector event)))) | 81 | (cmd (key-binding (vector event)))) |
| 81 | (cond ((eq cmd 'isearch-printing-char) | 82 | (cond ((or (eq cmd 'isearch-printing-char) |
| 83 | (eq cmd 'isearch-minibuffer-self-insert)) | ||
| 82 | (insert event) | 84 | (insert event) |
| 83 | (setq events (cdr events))) | 85 | (setq events (cdr events))) |
| 84 | ((eq cmd 'exit-minibuffer) | 86 | ((eq cmd 'exit-minibuffer) |
| @@ -87,8 +89,7 @@ | |||
| 87 | (t | 89 | (t |
| 88 | (throw 'isearch-tag nil)))))) | 90 | (throw 'isearch-tag nil)))))) |
| 89 | (setq unread-post-input-method-events events) | 91 | (setq unread-post-input-method-events events) |
| 90 | (or unread-post-input-method-events | 92 | (exit-minibuffer))) |
| 91 | (exit-minibuffer)))) | ||
| 92 | 93 | ||
| 93 | ;;;###autoload | 94 | ;;;###autoload |
| 94 | (defun isearch-process-search-multibyte-characters (last-char) | 95 | (defun isearch-process-search-multibyte-characters (last-char) |
| @@ -98,15 +99,15 @@ | |||
| 98 | (input-method-verbose-flag nil) | 99 | (input-method-verbose-flag nil) |
| 99 | (minibuffer-local-map isearch-minibuffer-local-map) | 100 | (minibuffer-local-map isearch-minibuffer-local-map) |
| 100 | str) | 101 | str) |
| 101 | (setq unread-input-method-events | 102 | (setq unread-command-events |
| 102 | (cons last-char unread-input-method-events)) | 103 | (cons last-char unread-command-events)) |
| 103 | (setq str (read-multilingual-string | 104 | (setq str (read-multilingual-string |
| 104 | (concat (isearch-message-prefix) isearch-message) | 105 | (concat (isearch-message-prefix) isearch-message) |
| 105 | nil | 106 | nil |
| 106 | current-input-method)) | 107 | current-input-method)) |
| 107 | (if (and str (> (length str) 0)) | 108 | (if (and str (> (length str) 0)) |
| 108 | (isearch-process-search-string str str) | 109 | (isearch-process-search-string str str)) |
| 109 | (isearch-update))) | 110 | (isearch-update)) |
| 110 | (isearch-process-search-char last-char))) | 111 | (isearch-process-search-char last-char))) |
| 111 | 112 | ||
| 112 | ;;; isearch-x.el ends here | 113 | ;;; isearch-x.el ends here |