Function: isearch-process-search-multibyte-characters

isearch-process-search-multibyte-characters is an autoloaded and byte-compiled function defined in isearch-x.el.gz.

Signature

(isearch-process-search-multibyte-characters LAST-CHAR &optional COUNT)

Source Code

;; Defined in /usr/src/emacs/lisp/international/isearch-x.el.gz
;;;###autoload
(defun isearch-process-search-multibyte-characters (last-char &optional count)
  (defvar junk-hist)
  (if (eq this-command 'isearch-printing-char)
      (let ((overriding-terminal-local-map nil)
	    (prompt (isearch-message-prefix))
	    (minibuffer-local-map isearch-minibuffer-local-map)
	    str junk-hist)

	;; PROMPT contains text-properties from
	;; `minibuffer-prompt-properties', and some of these can screw up
	;; its use in `read-string' below (specifically, a read-only
	;; property will cause it to signal an error), so strip them here;
	;; read-string will add the same properties itself anyway.
	;;
	(set-text-properties 0 (length prompt) nil prompt)

	(if isearch-input-method-function
	    (let (;; Let input method work rather tersely.
		  (input-method-verbose-flag nil))
	      (setq unread-command-events
		    (cons 'with-input-method
			  (cons last-char unread-command-events))
		    ;; Inherit current-input-method in a minibuffer.
		    str (read-string prompt isearch-message 'junk-hist nil t))
	      (deactivate-transient-input-method)
	      (if (or (not str) (< (length str) (length isearch-message)))
		  ;; All inputs were deleted while the input method
		  ;; was working.
		  (setq str "")
		(setq str (substring str (length isearch-message)))
		(if (and (= (length str) 1)
			 (= (aref str 0) last-char)
			 (>= last-char 128))
		    ;; The input method couldn't handle LAST-CHAR.
		    (setq str nil)))))

	(if (and (not str) (keyboard-coding-system))
	    (setq unread-command-events
		  (cons 'with-keyboard-coding
			(cons last-char unread-command-events))
		  str (read-string prompt nil 'junk-hist)))

	(if (and str (> (length str) 0))
	    (let ((unread-command-events nil))
	      (if (and (integerp count) (> count 1))
		  (let ((strs (mapconcat 'identity (make-list count str) "")))
		    (isearch-process-search-string strs strs))
		(isearch-process-search-string str str)))
	  (isearch-update)))
    (isearch-process-search-char last-char count)))