   "Launch the F# completion process in the background"
   (interactive)
 
-  (when (and fsharp-ac-completion-process
-             (process-live-p fsharp-ac-completion-process))
+  (when (fsharp-ac--process-live-p)
     (kill-process fsharp-ac-completion-process))
 
   (setq fsharp-ac-completion-process (fsharp-ac--configure-proc))


  (when (fsharp-ac--valid-project-p file)
    (fsharp-ac--reset)
    (fsharp-ac-start-process)
    ;; Load given project.
    (log-psendstr fsharp-ac-completion-process
                  (format "project \"%s\"\n" (expand-file-name file)))

  (and file
       (file-exists-p file)
       (string-match-p (rx "." (or "fsproj" "sln") eol) file)))

(defun fsharp-ac--script-file-p (file)
  (and file
       (string-match-p (rx (or "fsx" "fsscript"))
                       (file-name-extension file))))

(defun fsharp-ac--reset ()
  (setq fsharp-ac-completion-cache nil
