* 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
This commit is contained in:
Juri Linkov 2014-11-09 21:19:54 +02:00
parent 6f7716e8c7
commit d3dba954b3
5 changed files with 43 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2014-11-09 Juri Linkov <juri@jurta.org>
* search.texi (Other Repeating Search): Add documentation for
multi-isearch-files and multi-isearch-files-regexp. (Bug#13592)
2014-11-09 Glenn Morris <rgm@gnu.org>
* Makefile.in (version): Remove variable.

View file

@ -1436,6 +1436,22 @@ matching that regexp.
This command is just like @code{multi-isearch-buffers}, except it
performs an incremental regexp search.
@item M-x multi-isearch-files
Prompt for one or more file names, ending with @key{RET}; then,
begin a multi-file incremental search in those files. (If the
search fails in one file, the next @kbd{C-s} tries searching the
next specified file, and so forth.) With a prefix argument, prompt
for a regexp and begin a multi-file incremental search in files
matching that regexp.
@item M-x multi-isearch-files-regexp
This command is just like @code{multi-isearch-files}, except it
performs an incremental regexp search.
In some modes that set the buffer-local variable
@code{multi-isearch-next-buffer-function} (e.g., in Change Log mode)
a multi-file incremental search is activated automatically.
@cindex Occur mode
@cindex mode, Occur
@item M-x occur

View file

@ -1,3 +1,13 @@
2014-11-09 Juri Linkov <juri@jurta.org>
* isearch.el (isearch-message-prefix): Show "Multi-file" and
"Multi-buffer" instead of "Multi". (Bug#13592)
* 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.
2014-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment):

View file

@ -2514,7 +2514,10 @@ If there is no completion possible, say so and continue searching."
"word ")
"")
(if isearch-regexp "regexp " "")
(if multi-isearch-next-buffer-current-function "multi " "")
(cond
(multi-isearch-file-list "multi-file ")
(multi-isearch-buffer-list "multi-buffer ")
(t ""))
(or isearch-message-prefix-add "")
(if nonincremental "search" "I-search")
(if isearch-forward "" " backward")

View file

@ -91,6 +91,11 @@ Isearch starts.")
"The buffer where the search is currently searching.
The value is nil when the search still is in the initial buffer.")
;;;###autoload
(defvar multi-isearch-buffer-list nil)
;;;###autoload
(defvar multi-isearch-file-list nil)
(defvar multi-isearch-orig-search-fun nil)
(defvar multi-isearch-orig-wrap nil)
(defvar multi-isearch-orig-push-state nil)
@ -119,7 +124,9 @@ Intended to be added to `isearch-mode-hook'."
(defun multi-isearch-end ()
"Clean up the multi-buffer search after terminating isearch."
(setq multi-isearch-current-buffer nil
multi-isearch-next-buffer-current-function nil)
multi-isearch-next-buffer-current-function nil
multi-isearch-buffer-list nil
multi-isearch-file-list nil)
(setq-default isearch-search-fun-function multi-isearch-orig-search-fun
isearch-wrap-function multi-isearch-orig-wrap
isearch-push-state-function multi-isearch-orig-push-state)
@ -204,8 +211,6 @@ Switch to the buffer restored from the search status stack."
;;; Global multi-buffer search invocations
(defvar multi-isearch-buffer-list nil)
(defun multi-isearch-next-buffer-from-list (&optional buffer wrap)
"Return the next buffer in the series of buffers.
This function is used for multiple buffers Isearch. A sequence of
@ -290,8 +295,6 @@ whose names match the specified regexp."
;;; Global multi-file search invocations
(defvar multi-isearch-file-list nil)
(defun multi-isearch-next-file-buffer-from-list (&optional buffer wrap)
"Return the next buffer in the series of file buffers.
This function is used for multiple file buffers Isearch. A sequence