Skip to content

Commit a5a8298

Browse files
Merge pull request #169 from juergenhoetzel/start-fsautocomplete-on-non-existent-fsx
F# script files doesn't need to exist to be parsed
2 parents 198493c + d9610aa commit a5a8298

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fsharp-mode-completion.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,8 @@ For indirect buffers return the truename of the base buffer."
246246

247247
(defun fsharp-ac/load-file (file)
248248
"Start the compiler binding for an individual F# script FILE."
249-
(when (and (fsharp-ac--script-file-p file) (file-exists-p file))
250-
(unless (fsharp-ac--process-live-p (fsharp-ac--hostname file))
251-
(fsharp-ac/start-process))
249+
(when (and (fsharp-ac--script-file-p file) (not (fsharp-ac--process-live-p (fsharp-ac--hostname file))))
250+
(fsharp-ac/start-process)
252251
(add-hook 'after-save-hook 'fsharp-ac--load-after-save nil 'local)))
253252

254253
(defun fsharp-ac--load-after-save ()

test/test-common.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
(set-process-filter (&rest args))
3535
(set-process-query-on-exit-flag (&rest args))
3636
(process-send-string (&rest args))
37+
(fsharp-ac/start-process ())
3738
(fsharp-ac-completion-process (host) nil)
3839
(process-buffer (p) (get-buffer-create "*fsharp-complete*"))
3940
(process-mark (proc) (point-max))

0 commit comments

Comments
 (0)