From: Juri Linkov Date: Sun, 9 Nov 2014 19:19:54 +0000 (+0200) Subject: * lisp/isearch.el (isearch-message-prefix): Show "Multi-file" and X-Git-Tag: emacs-25.0.90~2635^2~519 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d3dba954b3fbbbad3d858756999752328ab6cee6;p=emacs.git * 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 --- 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 @@ +2014-11-09 Juri Linkov + + * search.texi (Other Repeating Search): Add documentation for + multi-isearch-files and multi-isearch-files-regexp. (Bug#13592) + 2014-11-09 Glenn Morris * 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. 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 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d2ce32586d9..c8fc5086817 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2014-11-09 Juri Linkov + + * 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 * 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." "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") 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.") "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