Function: reftex-isearch-minor-mode
reftex-isearch-minor-mode is an autoloaded, interactive and
byte-compiled function defined in reftex-global.el.gz.
Signature
(reftex-isearch-minor-mode &optional ARG)
Documentation
When on, isearch searches the whole document, not only the current file.
This minor mode allows isearch to search through all the files of the current TeX document.
This is a global minor mode. If called interactively, toggle the
Reftex-Isearch minor 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 (default-value \=reftex-isearch-minor-mode)'.
The mode's hook is called both when the mode is enabled and when it is disabled.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/reftex-global.el.gz
;; NB this is a global autoload - see reftex.el.
;;;###autoload
(define-minor-mode reftex-isearch-minor-mode
"When on, isearch searches the whole document, not only the current file.
This minor mode allows isearch to search through all the files of
the current TeX document."
:lighter "/I"
:global t
:group 'reftex
(if reftex-isearch-minor-mode
(progn
(dolist (crt-buf (buffer-list))
(with-current-buffer crt-buf
(when reftex-mode
(if (boundp 'multi-isearch-next-buffer-function)
(setq-local multi-isearch-next-buffer-function
#'reftex-isearch-switch-to-next-file)
(setq-local isearch-wrap-function
#'reftex-isearch-wrap-function)
(setq-local isearch-search-fun-function
(lambda () #'reftex-isearch-isearch-search))
(setq-local isearch-push-state-function
#'reftex-isearch-push-state-function)
(setq-local isearch-next-buffer-function
#'reftex-isearch-switch-to-next-file)))))
(add-hook 'reftex-mode-hook #'reftex-isearch-minor-mode))
(dolist (crt-buf (buffer-list))
(with-current-buffer crt-buf
(when reftex-mode
(if (boundp 'multi-isearch-next-buffer-function)
(kill-local-variable 'multi-isearch-next-buffer-function)
(kill-local-variable 'isearch-wrap-function)
(kill-local-variable 'isearch-search-fun-function)
(kill-local-variable 'isearch-push-state-function)
(kill-local-variable 'isearch-next-buffer-function)))))
(remove-hook 'reftex-mode-hook #'reftex-isearch-minor-mode)))