 		    (or (er--point-is-in-comment-p)
 			(er--point-is-in-string-p)))
 	  (setq last-point found-point)
-	  (setq found-point (re-search-forward regexp (min (point-max) limit) errorp)))
+	  (setq found-point (re-search-forward regexp limit errorp)))
 	found-point))
-  (re-search-forward regexp (min (point-max) limit) errorp))
+  (re-search-forward regexp limit errorp))
 
 (defun start-of-function ()
   ;; get the start of the function

	  ;; vars inside of the function
	  (when (and begin-function end-function)
	    (goto-char begin-function)
	    (while (re-search-forward *ojs-vars-regexp* (min (point-max) end-function) t)	      
	      (if list-of-cons
		  (push (cons (match-string-no-properties 1) (match-string-no-properties 0)) vars)
		(push (match-string-no-properties 1) vars)))

;;;; (:require-patch "")
;;;; HISTORY :
;;;; $Log$
;;;; Revision 3.5  2015/05/12 12:39:25  troche
;;;; * debug
;;;;
;;;; Revision 3.4  2015/05/12 11:35:30  troche
;;;; * debug when the file is almost empty
;;;;
