Mercurial > emacs
comparison lisp/isearch-multi.el @ 85667:4516d805659c
(isearch-buffers-multi): New option.
(isearch-buffers-search-fun): Test it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 26 Oct 2007 09:54:19 +0000 |
parents | 14c6e96eeaad |
children | f4816ef45bcb |
comparison
equal
deleted
inserted
replaced
85666:2a7d60a28bcf | 85667:4516d805659c |
---|---|
34 | 34 |
35 (defgroup isearch-buffers nil | 35 (defgroup isearch-buffers nil |
36 "Using isearch to search through multiple buffers." | 36 "Using isearch to search through multiple buffers." |
37 :version "23.1" | 37 :version "23.1" |
38 :group 'isearch) | 38 :group 'isearch) |
39 | |
40 (defcustom isearch-buffers-multi t | |
41 "Non-nil enables searching multiple related buffers, in certain modes." | |
42 :type 'boolean | |
43 :version "23.1" | |
44 :group 'isearch-buffers) | |
39 | 45 |
40 (defcustom isearch-buffers-pause t | 46 (defcustom isearch-buffers-pause t |
41 "A choice defining where to pause the search. | 47 "A choice defining where to pause the search. |
42 If the value is nil, don't pause before going to the next buffer. | 48 If the value is nil, don't pause before going to the next buffer. |
43 If the value is `initial', pause only after a failing search in the | 49 If the value is `initial', pause only after a failing search in the |
119 res) | 125 res) |
120 ;; 2. If the above search fails, start visiting next/prev buffers | 126 ;; 2. If the above search fails, start visiting next/prev buffers |
121 ;; successively, and search the string in them. Do this only | 127 ;; successively, and search the string in them. Do this only |
122 ;; when bound is nil (i.e. not while lazy-highlighting search | 128 ;; when bound is nil (i.e. not while lazy-highlighting search |
123 ;; strings in the current buffer). | 129 ;; strings in the current buffer). |
124 (unless bound | 130 (when (and (not bound) isearch-buffers-multi) |
125 ;; If no-pause or there was one attempt to leave the current buffer | 131 ;; If no-pause or there was one attempt to leave the current buffer |
126 (if (or (null isearch-buffers-pause) | 132 (if (or (null isearch-buffers-pause) |
127 (and isearch-buffers-pause isearch-buffers-current-buffer)) | 133 (and isearch-buffers-pause isearch-buffers-current-buffer)) |
128 (condition-case nil | 134 (condition-case nil |
129 (progn | 135 (progn |