anchor.diff:  (defvar *isearch-search-forward-function*)
   (defvar *isearch-search-backward-function*)
   (defvar *isearch-highlight-overlays* nil)
  +(defvar *case-fold-search* nil)
   
   (define-minor-mode isearch-mode
     (:name "isearch"
  
positive.code:       #'eobp))
  
  (defun search-forward (str &optional limit)
    (let ((length (1+ (count #\newline str))))
      (flet ((take-string ()
                          (join (string #\newline)
                                (buffer-take-lines (window-buffer)
                                                   (window-cur-linum)
                                                   length))))
        (search-step #'(lambda ()
                         (search str (take-string)
                                 :start2 (window-cur-col)))
  
negative.code:       #'bobp))
  
  (defun search-backward (str &optional limit)
    (unless *case-fold-search*
      (setq str (string-downcase str)))
    (let ((length (1+ (count #\newline str))))
      (flet ((%search (&optional end)
                      (let ((linum (- (window-cur-linum) (1- length))))
                        (when (< 0 linum)
                          (let* ((lines
                                  (buffer-take-lines (window-buffer)
                                                     linum
                                                     length))
                                 (string
                                  (join (string #\newline)
                                        (if (and (< 1 linum) end)
                                            (append (butlast lines)
                                                    (list
                                                     (subseq (car (last lines))
                                                             0 end)))
                                            lines))))
                            (search str
                                    (if *case-fold-search*
                                        string
                                        (string-downcase string))
                                    :from-end t))))))
        (search-step #'(lambda ()
                         (%search (window-cur-col)))
  