comparison lisp/international/isearch-x.el @ 64437:9a14f5181afd

(isearch-process-search-multibyte-characters): Remove unneeded `concat'. Add intermediate values to `junk-hist' instead of `minibuffer-history'. Test the length of `str'.
author Juri Linkov <juri@jurta.org>
date Mon, 18 Jul 2005 14:32:51 +0000
parents 18a818a2ee7c
children 43cc94d955c2 187d6a1f84f7
comparison
equal deleted inserted replaced
64436:8c591f014cf5 64437:9a14f5181afd
96 96
97 ;;;###autoload 97 ;;;###autoload
98 (defun isearch-process-search-multibyte-characters (last-char) 98 (defun isearch-process-search-multibyte-characters (last-char)
99 (if (eq this-command 'isearch-printing-char) 99 (if (eq this-command 'isearch-printing-char)
100 (let ((overriding-terminal-local-map nil) 100 (let ((overriding-terminal-local-map nil)
101 (prompt (concat (isearch-message-prefix))) 101 (prompt (isearch-message-prefix))
102 (minibuffer-local-map isearch-minibuffer-local-map) 102 (minibuffer-local-map isearch-minibuffer-local-map)
103 str) 103 str junk-hist)
104 (if isearch-input-method-function 104 (if isearch-input-method-function
105 (let (;; Let input method work rather tersely. 105 (let (;; Let input method work rather tersely.
106 (input-method-verbose-flag nil)) 106 (input-method-verbose-flag nil))
107 (setq unread-command-events 107 (setq unread-command-events
108 (cons 'with-input-method 108 (cons 'with-input-method
109 (cons last-char unread-command-events)) 109 (cons last-char unread-command-events))
110 ;; Inherit current-input-method in a minibuffer. 110 ;; Inherit current-input-method in a minibuffer.
111 str (read-string prompt isearch-message nil nil t)) 111 str (read-string prompt isearch-message 'junk-hist nil t))
112 (if (not str) 112 (if (or (not str) (< (length str) (length isearch-message)))
113 ;; All inputs were deleted while the input method 113 ;; All inputs were deleted while the input method
114 ;; was working. 114 ;; was working.
115 (setq str "") 115 (setq str "")
116 (setq str (substring str (length isearch-message))) 116 (setq str (substring str (length isearch-message)))
117 (if (and (= (length str) 1) 117 (if (and (= (length str) 1)
122 122
123 (if (and (not str) (keyboard-coding-system)) 123 (if (and (not str) (keyboard-coding-system))
124 (setq unread-command-events 124 (setq unread-command-events
125 (cons 'with-keyboard-coding 125 (cons 'with-keyboard-coding
126 (cons last-char unread-command-events)) 126 (cons last-char unread-command-events))
127 str (read-string prompt))) 127 str (read-string prompt nil 'junk-hist)))
128 128
129 (if (and str (> (length str) 0)) 129 (if (and str (> (length str) 0))
130 (let ((unread-command-events nil)) 130 (let ((unread-command-events nil))
131 (isearch-process-search-string str str)) 131 (isearch-process-search-string str str))
132 (isearch-update))) 132 (isearch-update)))