Quote filenames correctly in scad-compile

This commit is contained in:
Adam Goldsmith 2022-10-07 14:55:45 -04:00
parent 88fa55e297
commit 131737c318

View File

@ -734,7 +734,8 @@
(defun scad-compile (ext) (defun scad-compile (ext)
"Compile current buffer using 'scad-command' and the extention 'ext'" "Compile current buffer using 'scad-command' and the extention 'ext'"
(interactive (list (completing-read "Extension: " '("stl" "off" "amf" "dxf" "svg" "csg" "png")))) (interactive (list (completing-read "Extension: " '("stl" "off" "amf" "dxf" "svg" "csg" "png"))))
(compile (concat scad-command " -o " (file-name-sans-extension buffer-file-name) "." ext " " buffer-file-name))) (compile (combine-and-quote-strings
`(,scad-command "-o" ,(file-name-with-extension buffer-file-name ext) ,buffer-file-name))))
:bind (:map scad-mode-map ("C-c z" . scad-compile))) :bind (:map scad-mode-map ("C-c z" . scad-compile)))
(use-package smart-tabs-mode (use-package smart-tabs-mode