diff options
author | Karl Heuer <kwzh@gnu.org> | 1997-02-20 05:46:22 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1997-02-20 05:46:22 +0000 |
commit | 786f2291a05cd940b4fa8b7271698dd9e9f8bc39 (patch) | |
tree | 2c8ce627605c2aa6f5e118922abea481cedc0937 /lisp/isearch.el | |
parent | da40a12351fc2dcf28599032df4f61f071c0c4dc (diff) | |
download | emacs-786f2291a05cd940b4fa8b7271698dd9e9f8bc39.tar.gz |
(isearch-mode-map): Define
isearch-toggle-input-method and
isearch-toggle-specified-input-method in the map.
(isearch-multibyte-characters-flag): New variable.
(isearch-mode): Initialize it to nil.
(isearch-printing-char): Handle multibyte characters.
(isearch-message-prefix): Include title of input method if
necessary in the prefix of message.
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r-- | lisp/isearch.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index 9e5ad7d4a2e..28e2c1884b2 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -255,6 +255,9 @@ Default value, nil, means edit the string instead.") (define-key map [delete-frame] nil) (define-key map [iconify-frame] nil) (define-key map [make-frame-visible] nil) + ;; For searching multilingual text. + (define-key map "\C-\\" 'isearch-toggle-input-method) + (define-key map "\C-^" 'isearch-toggle-specified-input-method) (setq isearch-mode-map map) )) @@ -316,6 +319,9 @@ Default value, nil, means edit the string instead.") ;; Flag to indicate a yank occurred, so don't move the cursor. (defvar isearch-yank-flag nil) +;; Flag to indicate that we are searching multibyte characaters. +(defvar isearch-multibyte-characters-flag nil) + ;;; A function to be called after each input character is processed. ;;; (It is not called after characters that exit the search.) ;;; It is only set from an optional argument to `isearch-mode'. @@ -463,6 +469,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." isearch-other-end nil isearch-small-window nil isearch-just-started t + isearch-multibyte-characters-flag nil isearch-opoint (point) search-ring-yank-pointer nil @@ -1100,7 +1107,9 @@ Obsolete." (defun isearch-printing-char () "Add this ordinary printing character to the search string and search." (interactive) - (isearch-process-search-char (isearch-last-command-char))) + (if isearch-multibyte-characters-flag + (isearch-process-search-multibyte-characters (isearch-last-command-char)) + (isearch-process-search-char (isearch-last-command-char)))) (defun isearch-whitespace-chars () "Match all whitespace chars, if in regexp mode. @@ -1331,7 +1340,10 @@ If there is no completion possible, say so and continue searching." (if isearch-word "word " "") (if isearch-regexp "regexp " "") (if nonincremental "search" "I-search") - (if isearch-forward ": " " backward: ") + (if isearch-forward "" " backward") + (if isearch-multibyte-characters-flag + (concat " [" default-input-method-title "]: ") + ": ") ))) (aset m 0 (upcase (aref m 0))) m)) |