[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scad-mode c5e75ad4b6 1/3: Add custom variable to set defau
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scad-mode c5e75ad4b6 1/3: Add custom variable to set default output file extension |
Date: |
Tue, 29 Nov 2022 04:59:20 -0500 (EST) |
branch: elpa/scad-mode
commit c5e75ad4b6a3d6da83e0441c14528c37f7dcfbf8
Author: Mark Grosen <mark@grosen.org>
Commit: Mark Grosen <mark@grosen.org>
Add custom variable to set default output file extension
Enable users to set the default file type for scad-export via
a custom variable, scad-export-ext. The built-in default
is ".stl".
---
scad-mode.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/scad-mode.el b/scad-mode.el
index b4f6b0578a..5f537343e0 100644
--- a/scad-mode.el
+++ b/scad-mode.el
@@ -128,6 +128,11 @@
Options are axes, crosshairs, edges, scales, wireframe."
:type '(repeat string))
+(defcustom scad-export-ext ".stl"
+ "Extension (file type) for output data file via `scad-export'.
+Options are .stl, .off, .amf, .3mf, .csg, .dxf, .svg, .pdf, .png, .echo, .ast,
.term, .nef3, .nefdbg."
+ :type 'string)
+
(defvar scad-mode-map
(let ((map (c-make-inherited-keymap)))
(define-key map "\C-c\C-c" #'scad-preview)
@@ -212,7 +217,7 @@ Key bindings:
(list (read-file-name
"Export to: "
nil nil nil
- (concat (file-name-base (buffer-file-name)) ".stl"))))
+ (concat (file-name-base (buffer-file-name)) scad-export-ext))))
(save-buffer)
(compile (concat scad-command
" -o " (shell-quote-argument (expand-file-name file))