Mercurial > emacs
changeset 60524:d77fe7e90fb5
(Info-isearch-search): Emulate word search in
isearching through multiple Info nodes with Info-search.
(Info-isearch-wrap): Allow isearch-word.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Tue, 08 Mar 2005 21:50:11 +0000 |
parents | 2fa021a3a2fb |
children | aa8999e30efb |
files | lisp/info.el |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/info.el Tue Mar 08 21:48:50 2005 +0000 +++ b/lisp/info.el Tue Mar 08 21:50:11 2005 +0000 @@ -1646,10 +1646,16 @@ (Info-search regexp bound noerror count 'backward)) (defun Info-isearch-search () - (if (and Info-isearch-search (not isearch-word)) + (if Info-isearch-search (lambda (string &optional bound noerror count) (condition-case nil - (progn + (if isearch-word + (Info-search (concat "\\b" (replace-regexp-in-string + "\\W+" "\\\\W+" + (replace-regexp-in-string + "^\\W+\\|\\W+$" "" string)) "\\b") + bound noerror count + (unless isearch-forward 'backward)) (Info-search (if isearch-regexp string (regexp-quote string)) bound noerror count (unless isearch-forward 'backward)) @@ -1659,7 +1665,7 @@ (isearch-search-fun)))) (defun Info-isearch-wrap () - (when (and Info-isearch-search (not isearch-word)) + (when Info-isearch-search (if isearch-forward (Info-top-node) (Info-final-node)) (goto-char (if isearch-forward (point-min) (point-max)))))