Function: isearch-fold-quotes-mode

isearch-fold-quotes-mode is an interactive and byte-compiled function defined in isearch.el.gz.

Signature

(isearch-fold-quotes-mode &optional ARG)

Documentation

Minor mode to aid searching for ` characters in help modes.

This is a minor mode. If called interactively, toggle the Isearch-Fold-Quotes mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate isearch-fold-quotes-mode(var)/isearch-fold-quotes-mode(fun).

The mode's hook is called both when the mode is enabled and when it is disabled.

Probably introduced at or before Emacs version 29.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/isearch.el.gz
(define-minor-mode isearch-fold-quotes-mode
  "Minor mode to aid searching for \\=` characters in help modes."
  :lighter ""
  (if isearch-fold-quotes-mode
      (setq-local isearch-fold-quotes-mode--state
                  (buffer-local-set-state
                   search-default-mode
                   (lambda (string &optional _lax)
                     (thread-last
                       (regexp-quote string)
                       (replace-regexp-in-string "`" "[`‘]")
                       (replace-regexp-in-string "'" "['’]")
                       (replace-regexp-in-string "\"" "[\"“”]")))))
    (buffer-local-restore-state isearch-fold-quotes-mode--state)))