aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2014-11-09 21:19:54 +0200
committerJuri Linkov2014-11-09 21:19:54 +0200
commitd3dba954b3fbbbad3d858756999752328ab6cee6 (patch)
tree135d4fa1d11ada7e2b43f04d89899574f1561604
parent6f7716e8c74beb69adfe7af000facda8297c1cc7 (diff)
downloademacs-d3dba954b3fbbbad3d858756999752328ab6cee6.tar.gz
emacs-d3dba954b3fbbbad3d858756999752328ab6cee6.zip
* lisp/isearch.el (isearch-message-prefix): Show "Multi-file" and
"Multi-buffer" instead of "Multi". * lisp/misearch.el (multi-isearch-file-list): Autoload multi-isearch-buffer-list and multi-isearch-file-list. (multi-isearch-end): Reset multi-isearch-buffer-list and multi-isearch-file-list to nil. * doc/emacs/search.texi (Other Repeating Search): Add documentation for multi-isearch-files and multi-isearch-files-regexp. Fixes: debbugs:13592
-rw-r--r--doc/emacs/ChangeLog5
-rw-r--r--doc/emacs/search.texi16
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/isearch.el5
-rw-r--r--lisp/misearch.el13
5 files changed, 43 insertions, 6 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 8e85c890285..0ca6af0e648 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,8 @@
12014-11-09 Juri Linkov <juri@jurta.org>
2
3 * search.texi (Other Repeating Search): Add documentation for
4 multi-isearch-files and multi-isearch-files-regexp. (Bug#13592)
5
12014-11-09 Glenn Morris <rgm@gnu.org> 62014-11-09 Glenn Morris <rgm@gnu.org>
2 7
3 * Makefile.in (version): Remove variable. 8 * Makefile.in (version): Remove variable.
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index bd0bd0bf641..a0c59c6f87f 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -1436,6 +1436,22 @@ matching that regexp.
1436This command is just like @code{multi-isearch-buffers}, except it 1436This command is just like @code{multi-isearch-buffers}, except it
1437performs an incremental regexp search. 1437performs an incremental regexp search.
1438 1438
1439@item M-x multi-isearch-files
1440Prompt for one or more file names, ending with @key{RET}; then,
1441begin a multi-file incremental search in those files. (If the
1442search fails in one file, the next @kbd{C-s} tries searching the
1443next specified file, and so forth.) With a prefix argument, prompt
1444for a regexp and begin a multi-file incremental search in files
1445matching that regexp.
1446
1447@item M-x multi-isearch-files-regexp
1448This command is just like @code{multi-isearch-files}, except it
1449performs an incremental regexp search.
1450
1451In some modes that set the buffer-local variable
1452@code{multi-isearch-next-buffer-function} (e.g., in Change Log mode)
1453a multi-file incremental search is activated automatically.
1454
1439@cindex Occur mode 1455@cindex Occur mode
1440@cindex mode, Occur 1456@cindex mode, Occur
1441@item M-x occur 1457@item M-x occur
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d2ce32586d9..c8fc5086817 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12014-11-09 Juri Linkov <juri@jurta.org>
2
3 * isearch.el (isearch-message-prefix): Show "Multi-file" and
4 "Multi-buffer" instead of "Multi". (Bug#13592)
5
6 * misearch.el (multi-isearch-file-list): Autoload
7 multi-isearch-buffer-list and multi-isearch-file-list.
8 (multi-isearch-end): Reset multi-isearch-buffer-list and
9 multi-isearch-file-list to nil.
10
12014-11-09 Stefan Monnier <monnier@iro.umontreal.ca> 112014-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
2 12
3 * emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): 13 * emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 7c8cf847eb7..f0ce7050e78 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2514,7 +2514,10 @@ If there is no completion possible, say so and continue searching."
2514 "word ") 2514 "word ")
2515 "") 2515 "")
2516 (if isearch-regexp "regexp " "") 2516 (if isearch-regexp "regexp " "")
2517 (if multi-isearch-next-buffer-current-function "multi " "") 2517 (cond
2518 (multi-isearch-file-list "multi-file ")
2519 (multi-isearch-buffer-list "multi-buffer ")
2520 (t ""))
2518 (or isearch-message-prefix-add "") 2521 (or isearch-message-prefix-add "")
2519 (if nonincremental "search" "I-search") 2522 (if nonincremental "search" "I-search")
2520 (if isearch-forward "" " backward") 2523 (if isearch-forward "" " backward")
diff --git a/lisp/misearch.el b/lisp/misearch.el
index 64ea40b7a1d..4b003b9b19d 100644
--- a/lisp/misearch.el
+++ b/lisp/misearch.el
@@ -91,6 +91,11 @@ Isearch starts.")
91 "The buffer where the search is currently searching. 91 "The buffer where the search is currently searching.
92The value is nil when the search still is in the initial buffer.") 92The value is nil when the search still is in the initial buffer.")
93 93
94;;;###autoload
95(defvar multi-isearch-buffer-list nil)
96;;;###autoload
97(defvar multi-isearch-file-list nil)
98
94(defvar multi-isearch-orig-search-fun nil) 99(defvar multi-isearch-orig-search-fun nil)
95(defvar multi-isearch-orig-wrap nil) 100(defvar multi-isearch-orig-wrap nil)
96(defvar multi-isearch-orig-push-state nil) 101(defvar multi-isearch-orig-push-state nil)
@@ -119,7 +124,9 @@ Intended to be added to `isearch-mode-hook'."
119(defun multi-isearch-end () 124(defun multi-isearch-end ()
120 "Clean up the multi-buffer search after terminating isearch." 125 "Clean up the multi-buffer search after terminating isearch."
121 (setq multi-isearch-current-buffer nil 126 (setq multi-isearch-current-buffer nil
122 multi-isearch-next-buffer-current-function nil) 127 multi-isearch-next-buffer-current-function nil
128 multi-isearch-buffer-list nil
129 multi-isearch-file-list nil)
123 (setq-default isearch-search-fun-function multi-isearch-orig-search-fun 130 (setq-default isearch-search-fun-function multi-isearch-orig-search-fun
124 isearch-wrap-function multi-isearch-orig-wrap 131 isearch-wrap-function multi-isearch-orig-wrap
125 isearch-push-state-function multi-isearch-orig-push-state) 132 isearch-push-state-function multi-isearch-orig-push-state)
@@ -204,8 +211,6 @@ Switch to the buffer restored from the search status stack."
204 211
205;;; Global multi-buffer search invocations 212;;; Global multi-buffer search invocations
206 213
207(defvar multi-isearch-buffer-list nil)
208
209(defun multi-isearch-next-buffer-from-list (&optional buffer wrap) 214(defun multi-isearch-next-buffer-from-list (&optional buffer wrap)
210 "Return the next buffer in the series of buffers. 215 "Return the next buffer in the series of buffers.
211This function is used for multiple buffers Isearch. A sequence of 216This function is used for multiple buffers Isearch. A sequence of
@@ -290,8 +295,6 @@ whose names match the specified regexp."
290 295
291;;; Global multi-file search invocations 296;;; Global multi-file search invocations
292 297
293(defvar multi-isearch-file-list nil)
294
295(defun multi-isearch-next-file-buffer-from-list (&optional buffer wrap) 298(defun multi-isearch-next-file-buffer-from-list (&optional buffer wrap)
296 "Return the next buffer in the series of file buffers. 299 "Return the next buffer in the series of file buffers.
297This function is used for multiple file buffers Isearch. A sequence 300This function is used for multiple file buffers Isearch. A sequence