emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp misearch.el


From: Juri Linkov
Subject: [Emacs-diffs] emacs/lisp misearch.el
Date: Sun, 28 Dec 2008 23:45:54 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Juri Linkov <jurta>     08/12/28 23:45:54

Modified files:
        lisp           : misearch.el 

Log message:
        (multi-isearch-next-buffer-function): Doc fix.
        (multi-isearch-search-fun): Set the second arg WRAP to nil explicitly.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/misearch.el?cvsroot=emacs&r1=1.1&r2=1.2

Patches:
Index: misearch.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/misearch.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- misearch.el 23 Jul 2008 23:50:06 -0000      1.1
+++ misearch.el 28 Dec 2008 23:45:53 -0000      1.2
@@ -66,14 +66,19 @@
 to the next buffer in the series and continues searching for the
 next occurrence.
 
+This function should return the next buffer (it doesn't need to switch
+to it), or nil if it can't find the next buffer (when it reaches the
+end of the search space).
+
 The first argument of this function is the current buffer where the
 search is currently searching.  It defines the base buffer relative to
 which this function should find the next buffer.  When the isearch
 direction is backward (when `isearch-forward' is nil), this function
-should return the previous buffer to search.  If the second argument of
-this function WRAP is non-nil, then it should return the first buffer
-in the series; and for the backward search, it should return the last
-buffer in the series.")
+should return the previous buffer to search.
+
+If the second argument of this function WRAP is non-nil, then it
+should return the first buffer in the series; and for the backward
+search, it should return the last buffer in the series.")
 
 ;;;###autoload
 (defvar multi-isearch-next-buffer-current-function nil
@@ -153,7 +158,7 @@
                   (while (not found)
                     ;; Find the next buffer to search
                     (setq buffer (funcall 
multi-isearch-next-buffer-current-function
-                                          buffer))
+                                          buffer nil))
                     (with-current-buffer buffer
                       (goto-char (if isearch-forward (point-min) (point-max)))
                       (setq isearch-barrier (point) isearch-opoint (point))
@@ -167,6 +172,7 @@
                   ;; Return point of the new search result
                   found)
               ;; Return nil when multi-isearch-next-buffer-current-function 
fails
+              ;; (`with-current-buffer' raises an error for nil returned from 
it).
               (error nil))
           (signal 'search-failed (list string "Repeat for next buffer"))))))))
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]