comparison lisp/isearch.el @ 18866:04d56f77da0d

(search-invisible): Fix typo. (isearch-search): Bind inhibit-point-motion-hooks because we might have to search inside invisible and intangible text. (isearch-open-overlay-temporary): Delete forgoten debug message. (isearch-range-invisible): Fix typo in doc-string.
author Richard M. Stallman <rms@gnu.org>
date Sat, 19 Jul 1997 05:34:23 +0000
parents 7032bbacd2fa
children e132d9bcfd5d
comparison
equal deleted inserted replaced
18865:43d28a5c7b68 18866:04d56f77da0d
168 an overlay having an `invisible' property and that overlay has a property 168 an overlay having an `invisible' property and that overlay has a property
169 `isearch-open-invisible', then incremental search will show the contents. 169 `isearch-open-invisible', then incremental search will show the contents.
170 \(This applies when using `outline.el' and `hideshow.el'.)" 170 \(This applies when using `outline.el' and `hideshow.el'.)"
171 :type '(choice (const :tag "Match hidden text" t) 171 :type '(choice (const :tag "Match hidden text" t)
172 (const :tag "Open overlays" open) 172 (const :tag "Open overlays" open)
173 (const :tag "Don't match hidden text" t)) 173 (const :tag "Don't match hidden text" nil))
174 :group 'isearch) 174 :group 'isearch)
175 175
176 (defcustom isearch-hide-immediately t 176 (defcustom isearch-hide-immediately t
177 "If t hide the previous match if needed. 177 "If t hide the previous match if needed.
178 This has efect iff `search-invisible' is set to `open' and it means 178 This has efect iff `search-invisible' is set to `open' and it means
1432 (isearch-message nil t) 1432 (isearch-message nil t)
1433 (if (and (eq isearch-case-fold-search t) search-upper-case) 1433 (if (and (eq isearch-case-fold-search t) search-upper-case)
1434 (setq isearch-case-fold-search 1434 (setq isearch-case-fold-search
1435 (isearch-no-upper-case-p isearch-string isearch-regexp))) 1435 (isearch-no-upper-case-p isearch-string isearch-regexp)))
1436 (condition-case lossage 1436 (condition-case lossage
1437 (let ((inhibit-quit nil) 1437 (let ((inhibit-point-motion-hooks search-invisible)
1438 (inhibit-quit nil)
1438 (case-fold-search isearch-case-fold-search) 1439 (case-fold-search isearch-case-fold-search)
1439 (retry t)) 1440 (retry t))
1440 (if isearch-regexp (setq isearch-invalid-regexp nil)) 1441 (if isearch-regexp (setq isearch-invalid-regexp nil))
1441 (setq isearch-within-brackets nil) 1442 (setq isearch-within-brackets nil)
1442 (while retry 1443 (while retry
1488 (goto-char (nth 2 (car isearch-cmds))))) 1489 (goto-char (nth 2 (car isearch-cmds)))))
1489 1490
1490 1491
1491 ;;; Called when opening an overlay, and we are still in isearch. 1492 ;;; Called when opening an overlay, and we are still in isearch.
1492 (defun isearch-open-overlay-temporary (ov) 1493 (defun isearch-open-overlay-temporary (ov)
1493 (message "temporary called")
1494 (if (not (null (overlay-get ov 'isearch-open-invisible-temporary))) 1494 (if (not (null (overlay-get ov 'isearch-open-invisible-temporary)))
1495 ;; Some modes would want to open the overlays temporary during 1495 ;; Some modes would want to open the overlays temporary during
1496 ;; isearch in their own way, they should set the 1496 ;; isearch in their own way, they should set the
1497 ;; `isearch-open-invisible-temporary' to a function doing this. 1497 ;; `isearch-open-invisible-temporary' to a function doing this.
1498 (funcall (overlay-get ov 'isearch-open-invisible-temporary) ov nil) 1498 (funcall (overlay-get ov 'isearch-open-invisible-temporary) ov nil)
1566 (overlay-put ov 'intangible (overlay-get ov 'isearch-intangible)) 1566 (overlay-put ov 'intangible (overlay-get ov 'isearch-intangible))
1567 (overlay-put ov 'isearch-invisible nil) 1567 (overlay-put ov 'isearch-invisible nil)
1568 (overlay-put ov 'isearch-intangible nil)))))) 1568 (overlay-put ov 'isearch-intangible nil))))))
1569 1569
1570 (defun isearch-range-invisible (beg end) 1570 (defun isearch-range-invisible (beg end)
1571 "Return t if all the bext from BEG to END is invisible." 1571 "Return t if all the text from BEG to END is invisible."
1572 (and (/= beg end) 1572 (and (/= beg end)
1573 ;; Check that invisibility runs up to END. 1573 ;; Check that invisibility runs up to END.
1574 (save-excursion 1574 (save-excursion
1575 (goto-char beg) 1575 (goto-char beg)
1576 (let 1576 (let