summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2026-05-29 17:36:06 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2026-05-29 17:36:06 -0400
commita2379402fc9d4aed342d85c171cbddea8be37862 (patch)
treed30e7e581e2311d0a7ee38d98f8f50acb0b41989 /lisp
parent36c6908616562201f87fbbe4f0f5556baa5eeac7 (diff)
(reftex-isearch-minor-mode): A few more simplifications
* lisp/textmodes/reftex-global.el (reftex-isearch-minor-mode): Simplify docstring. Remove redundant `setq`s and mode line update.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/reftex-global.el18
1 files changed, 5 insertions, 13 deletions
diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el
index 54c5c97be01..8f6f0a1445a 100644
--- a/lisp/textmodes/reftex-global.el
+++ b/lisp/textmodes/reftex-global.el
@@ -478,14 +478,10 @@ Also checks if buffers visiting the files are in read-only mode."
(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.
-
-With no argument, this command toggles
-`reftex-isearch-minor-mode'. With a prefix argument ARG, turn
-`reftex-isearch-minor-mode' on if ARG is positive, otherwise turn it off.
-This behaviour is derived from `define-minor-mode'."
+the current TeX document."
:lighter "/I"
:global t
+ :group 'reftex
(if reftex-isearch-minor-mode
(progn
(dolist (crt-buf (buffer-list))
@@ -501,8 +497,7 @@ This behaviour is derived from `define-minor-mode'."
(setq-local isearch-push-state-function
#'reftex-isearch-push-state-function)
(setq-local isearch-next-buffer-function
- #'reftex-isearch-switch-to-next-file))
- (setq reftex-isearch-minor-mode t))))
+ #'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
@@ -512,11 +507,8 @@ This behaviour is derived from `define-minor-mode'."
(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))
- (setq reftex-isearch-minor-mode nil))))
- (remove-hook 'reftex-mode-hook #'reftex-isearch-minor-mode))
- ;; Force mode line redisplay.
- (set-buffer-modified-p (buffer-modified-p)))
+ (kill-local-variable 'isearch-next-buffer-function)))))
+ (remove-hook 'reftex-mode-hook #'reftex-isearch-minor-mode)))