     (if (empty? errs)
       (do
         (search-dirs (get-search-dirs settings) settings)
-        []
-      )
-      errs
-    )
-  )
-)
-
+        [])
+      errs)))


(defn search-lines
  ([lines settings]
    ; (if (:debug settings)
    ;   (log-msg "Searching lines"))
    (let [line (first lines)
          nextlines (drop (:linesafter settings) lines)
          linesbefore []
          linesafter (take (:linesafter settings) lines)]
      (search-lines 1 line nextlines linesbefore linesafter [] settings)
    )
  )
  ([linenum line lines linesbefore linesafter results settings]
    (if line
      (let [nextresults (search-line linenum line linesbefore linesafter settings)

                       line
                       linesbefore
                       linesafter)]
          (if (:firstmatch settings)
            [result]
            (concat [result] (search-multiline-string-for-pattern s m
