201 |
:type 'regexp |
:type 'regexp |
202 |
:group 'info) |
:group 'info) |
203 |
|
|
204 |
|
(defcustom Info-isearch-search t |
205 |
|
"*If non-nil, isearch invoked in Info mode uses `Info-search' function. |
206 |
|
This allows isearch to search through multiple nodes. |
207 |
|
When isearch fails, it wraps and restarts the search from the |
208 |
|
top/final node depending on search direction." |
209 |
|
:version "22.1" |
210 |
|
:type 'boolean |
211 |
|
:group 'info) |
212 |
|
|
213 |
(defcustom Info-mode-hook |
(defcustom Info-mode-hook |
214 |
;; Try to obey obsolete Info-fontify settings. |
;; Try to obey obsolete Info-fontify settings. |
215 |
(unless (and (boundp 'Info-fontify) (null Info-fontify)) |
(unless (and (boundp 'Info-fontify) (null Info-fontify)) |
1646 |
(Info-search regexp bound noerror count 'backward)) |
(Info-search regexp bound noerror count 'backward)) |
1647 |
|
|
1648 |
(defun Info-isearch-search () |
(defun Info-isearch-search () |
1649 |
(cond |
(if (and Info-isearch-search (not isearch-word)) |
1650 |
(isearch-word |
(lambda (string &optional bound noerror count) |
1651 |
(if isearch-forward 'word-search-forward 'word-search-backward)) |
(condition-case nil |
1652 |
(isearch-regexp |
(progn |
1653 |
(lambda (regexp bound noerror) |
(Info-search (if isearch-regexp string (regexp-quote string)) |
1654 |
(condition-case nil |
bound noerror count |
1655 |
(progn |
(unless isearch-forward 'backward)) |
1656 |
(Info-search regexp bound noerror nil |
(point)) |
1657 |
(unless isearch-forward 'backward)) |
(error nil))) |
1658 |
(point)) |
(let ((isearch-search-fun-function nil)) |
1659 |
(error nil)))) |
(isearch-search-fun)))) |
|
(t |
|
|
(if isearch-forward 'search-forward 'search-backward)))) |
|
1660 |
|
|
1661 |
(defun Info-isearch-wrap () |
(defun Info-isearch-wrap () |
1662 |
(if isearch-regexp |
(when (and Info-isearch-search (not isearch-word)) |
1663 |
(if isearch-forward (Info-top-node) (Info-final-node)) |
(if isearch-forward (Info-top-node) (Info-final-node)) |
1664 |
(goto-char (if isearch-forward (point-min) (point-max))))) |
(goto-char (if isearch-forward (point-min) (point-max))))) |
1665 |
|
|
1666 |
(defun Info-isearch-push-state () |
(defun Info-isearch-push-state () |