 For  require('  case, the prefix point is at 'r'."
   (if node-ac-evaluated-syntax
 	  ;; When there's an evaluated syntax, try to match the prefix
-	  (let ((possible-syntax (node-ac-possible-syntax)))
+	  (let ((possible-syntax (node-ac-possible-syntax))
+			last-property-start-point)
 		(if (and possible-syntax
 				 (or (null ac-auto-start)
 					 (>= (length possible-syntax) ac-auto-start)))
 			;; Prefix matches, should start an auto-complete
-			(let ((last-property-start-point (string-match "\\.[^\.]*$" possible-syntax)))
-			  (if last-property-start-point
-				  (+ (- (point) (length possible-syntax)) last-property-start-point 1)
-				(- (point) (length possible-syntax))))
+			(if (setq last-property-start-point (string-match "\\.[^\.]*$" possible-syntax))
+				(+ (- (point) (length possible-syntax)) last-property-start-point 1)
+			  (- (point) (length possible-syntax)))
 		  ;; Else, reset and trigger a new evaluation
 		  (node-ac-reset)
 		  (point)))


;;; Functions and definitions for node-ac auto-complete sources

(defun node-ac-candidates ()
  "Get the auto-complete candidates.


    numbers and strings, definition for functions."
  (if (node-ac-evaluated-syntax-is-prefix-of-current-syntax)
	  node-ac-completion-popup-display-info
	(unless node-ac-idle-timer
	  (setq node-ac-idle-timer (run-with-idle-timer 0 nil 'node-ac-invoke-ac-when-idle)))
	nil))

(defun node-ac-format-document (doc)
