Commit | Line | Data |
---|---|---|
4ed46869 KH |
1 | ;;; isearch-x.el --- extended isearch handling commands |
2 | ||
4ed46869 | 3 | ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. |
fa526c4a | 4 | ;; Licensed to the Free Software Foundation. |
4ed46869 KH |
5 | |
6 | ;; Keywords: multilingual, isearch | |
7 | ||
8 | ;; Author: Kenichi HANDA <handa@etl.go.jp> | |
9 | ;; Maintainer: Kenichi HANDA <handa@etl.go.jp> | |
10 | ||
11 | ;; This file is part of GNU Emacs. | |
12 | ||
13 | ;; GNU Emacs is free software; you can redistribute it and/or modify | |
14 | ;; it under the terms of the GNU General Public License as published by | |
15 | ;; the Free Software Foundation; either version 2, or (at your option) | |
16 | ;; any later version. | |
17 | ||
18 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
19 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | ;; GNU General Public License for more details. | |
22 | ||
23 | ;; You should have received a copy of the GNU General Public License | |
369314dc KH |
24 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
25 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
26 | ;; Boston, MA 02111-1307, USA. | |
4ed46869 KH |
27 | |
28 | ;;; Code: | |
29 | ||
30 | ;;;###autoload | |
31 | (defun isearch-toggle-specified-input-method () | |
e81ed9ed | 32 | "Select an input method and turn it on in interactive search." |
4ed46869 | 33 | (interactive) |
000028d7 KH |
34 | (let ((overriding-terminal-local-map nil)) |
35 | (toggle-input-method t)) | |
36 | (isearch-update)) | |
4ed46869 KH |
37 | |
38 | ;;;###autoload | |
39 | (defun isearch-toggle-input-method () | |
40 | "Toggle input method in interactive search." | |
41 | (interactive) | |
000028d7 KH |
42 | (let ((overriding-terminal-local-map nil)) |
43 | (toggle-input-method)) | |
4ed46869 KH |
44 | (isearch-update)) |
45 | ||
000028d7 | 46 | ;;;###autoload |
4ed46869 | 47 | (defun isearch-process-search-multibyte-characters (last-char) |
e81ed9ed KH |
48 | (let ((overriding-terminal-local-map nil) |
49 | ;; Let input method exit when a chunk is inserted. | |
000028d7 | 50 | (input-method-after-insert-chunk-hook '(inactivate-input-method)) |
e81ed9ed KH |
51 | (input-method-inactivate-hook '(exit-minibuffer)) |
52 | ;; Let input method work rather tersely. | |
8dc586a7 | 53 | (input-method-verbose-flag nil) |
000028d7 KH |
54 | ;; A key not handled by the current input method should |
55 | ;; terminate the input method. | |
56 | (input-method-exit-on-invalid-key t) | |
e81ed9ed | 57 | str) |
4ed46869 | 58 | (setq unread-command-events (cons last-char unread-command-events)) |
e81ed9ed KH |
59 | (setq str (read-multilingual-string |
60 | (concat (isearch-message-prefix) isearch-message) | |
61 | nil | |
000028d7 | 62 | current-input-method)) |
fa7bc762 KH |
63 | (if (and str (> (length str) 0)) |
64 | (isearch-process-search-string str str) | |
65 | (isearch-update)))) | |
4ed46869 KH |
66 | |
67 | ;;; isearch-x.el ends here |