Function: isearch-backslash

isearch-backslash is a byte-compiled function defined in isearch.el.gz.

Signature

(isearch-backslash STR)

Documentation

Return t if STR ends in an odd number of backslashes.

Source Code

;; Defined in /usr/src/emacs/lisp/isearch.el.gz
;; *, ?, }, and | chars can make a regexp more liberal.
;; They can make a regexp match sooner or make it succeed instead of failing.
;; So go back to place last successful search started
;; or to the last ^S/^R (barrier), whichever is nearer.
;; + needs no special handling because the string must match at least once.

(defun isearch-backslash (str)
  "Return t if STR ends in an odd number of backslashes."
  (= (mod (- (length str) (string-match "\\\\*\\'" str)) 2) 1))