From 9eefd217ea7913082964ca1f985fdc876fd552ff Mon Sep 17 00:00:00 2001 From: Juergen Hoetzel Date: Tue, 17 Oct 2017 18:30:00 +0200 Subject: [PATCH] Check for missing compile/build commands Refs #150. --- fsharp-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsharp-mode.el b/fsharp-mode.el index 85a56d4..d6bf7e8 100644 --- a/fsharp-mode.el +++ b/fsharp-mode.el @@ -298,8 +298,8 @@ Otherwise, treat as a stand-alone file." (file-exists-p (concat dname "/makefile"))))) (cond (makefile compile-command) - (proj (combine-and-quote-strings (list fsharp-build-command "/nologo" proj))) - ((or (equal ext "fs") (equal ext "fsx")) (combine-and-quote-strings (list fsharp-compile-command "--nologo" file))) + ((and fsharp-build-command proj) (combine-and-quote-strings `(,fsharp-build-command "/nologo" ,proj))) + ((and fsharp-compile-command (member ext '("fs" "fsx"))) (combine-and-quote-strings `(,fsharp-compile-command "--nologo" ,file))) ((equal ext "fsl") (combine-and-quote-strings (list "fslex" file))) ((equal ext "fsy") (combine-and-quote-strings (list "fsyacc" file))) (t compile-command))))