Function: isearch-quote-char
isearch-quote-char is an interactive and byte-compiled function
defined in isearch.el.gz.
Signature
(isearch-quote-char &optional COUNT)
Documentation
Quote special characters for incremental search.
With argument, add COUNT copies of the character.
Probably introduced at or before Emacs version 24.4.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/isearch.el.gz
(defun isearch-quote-char (&optional count)
"Quote special characters for incremental search.
With argument, add COUNT copies of the character."
(interactive "p")
(let ((char (read-quoted-char (isearch-message t))))
(unless (characterp char)
(user-error "%s is not a valid character"
(key-description (vector char))))
;; Assume character codes 0200 - 0377 stand for characters in some
;; single-byte character set, and convert them to Emacs
;; characters.
(if (and isearch-regexp isearch-regexp-lax-whitespace (= char ?\s))
(if (subregexp-context-p isearch-string (length isearch-string))
(isearch-process-search-string "[ ]" " ")
(isearch-process-search-char char count))
;; This used to assume character codes 0240 - 0377 stand for
;; characters in some single-byte character set, and converted them
;; to Emacs characters. But in 23.1 this feature is deprecated
;; in favor of inserting the corresponding Unicode characters.
;; (and enable-multibyte-characters
;; (>= char ?\200)
;; (<= char ?\377)
;; (setq char (unibyte-char-to-multibyte char)))
(isearch-process-search-char char count))))