[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scad-mode 4d92026a1a 07/47: Introduce explicit customizati
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scad-mode 4d92026a1a 07/47: Introduce explicit customization group and linting |
Date: |
Sat, 12 Nov 2022 13:59:34 -0500 (EST) |
branch: elpa/scad-mode
commit 4d92026a1a21bcce0852e4c9459df35f34970e9b
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Introduce explicit customization group and linting
---
scad-mode.el | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/scad-mode.el b/scad-mode.el
index 602449dda7..ebd3b4ad85 100644
--- a/scad-mode.el
+++ b/scad-mode.el
@@ -29,7 +29,7 @@
;; This is a major-mode to implement the SCAD constructs and
;; font-locking for OpenSCAD
;;
-;; If installing manually, insert the following into your emacs startup:
+;; If installing manually, insert the following into your Emacs startup:
;;
;; (autoload 'scad-mode "scad-mode" "A major mode for editing OpenSCAD code."
t)
;; (add-to-list 'auto-mode-alist '("\\.scad$" . scad-mode))
@@ -54,22 +54,25 @@
(eval-when-compile
(require 'cc-langs)
(require 'cc-fonts)
- (require 'cl))
+ (require 'cl-lib))
(eval-and-compile
(c-add-language 'scad-mode 'c-mode))
+(defgroup scad nil
+ "A major mode for editing OpenSCAD code."
+ :group 'languages
+ :prefix "scad-")
+
(defcustom scad-command
- '"openscad"
- "Path to openscad executable"
- :type 'string
- )
+ "openscad"
+ "Path to openscad executable."
+ :type 'string)
(defcustom scad-keywords
'("return" "true" "false")
"SCAD keywords."
- :type 'list
- :group 'scad-font-lock)
+ :type 'list)
(defcustom scad-functions
'("cos" "acos" "sin" "asin" "tan" "atan" "atan2"
;;func.cc
@@ -85,8 +88,7 @@
"is_undef" "is_list" "is_num" "is_bool" "is_string"
;;2019.05 type test
)
"SCAD functions."
- :type 'list
- :group 'scad-font-lock)
+ :type 'list)
(defcustom scad-modules
'("children" "echo" "for" "intersection_for" "if" "else"
;;control.cc
@@ -106,15 +108,13 @@
"let" "offset" "text"
;;2015.03
)
"SCAD modules."
- :type 'list
- :group 'scad-font-lock)
+ :type 'list)
(defcustom scad-deprecated
'("child" "assign" "dxf_linear_extrude" "dxf_rotate_extrude"
"import_stl" "import_off" "import_dxf")
"SCAD deprecated modules and functions."
- :type 'list
- :group 'scad-font-lock)
+ :type 'list)
(defcustom scad-operators
'("+" "-" "*" "/" "%"
@@ -122,8 +122,7 @@
"<" "<=" "==" "!=" ">" ">="
"?" ":" "=")
"SCAD operators."
- :type 'list
- :group 'scad-font-lock)
+ :type 'list)
(defvar scad-mode-map
(let ((map (make-sparse-keymap)))
@@ -181,9 +180,9 @@
(defconst scad-font-lock-keywords-3 scad-font-lock-keywords)
(defvar scad-indent-style nil
- "The style of indentation for scad-mode. Defaults to \"k&r\" if
- nil. If you want to set the style with file local variables use
- the `c-file-style' variable")
+ "The style of indentation for `scad-mode'.
+Defaults to K&R if nil. If you want to set the style with file
+ local variables use the `c-file-style' variable.")
(defvar scad-completions
(append '("module" "function" "use" "include")
@@ -191,8 +190,7 @@
"List of known words for completion.")
(defcustom scad-mode-disable-c-mode-hook t
- "When set to `T', do not run hooks of parent mode (`c-mode')."
- :group 'scad-mode
+ "When set to t, do not run hooks of parent mode (`c-mode')."
:tag "SCAD Mode Disable C Mode Hook"
:type 'boolean)
@@ -208,8 +206,9 @@ initialization, then `scad-mode-hook'.
Key bindings:
\\{scad-mode-map}"
+ :group 'scad
(add-hook 'completion-at-point-functions
- 'scad-completion-at-point nil 'local)
+ #'scad-completion-at-point nil 'local)
(when scad-mode-disable-c-mode-hook
(setq-local c-mode-hook nil))
(c-initialize-cc-mode t)
@@ -242,6 +241,7 @@ Key bindings:
(add-hook 'scad-mode-hook 'scad-prime-dabbrev)
(defun scad-open-current-buffer ()
+ "Open current buffer with `scad-command'."
(interactive)
(call-process scad-command nil 0 nil (buffer-file-name)))
- [nongnu] branch elpa/scad-mode created (now 3076e240bf), ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode e64d93cdb2 02/47: Import scad-mode.el from 63b97a0c6da9ceea215395d9d54dd33187a2299d, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 708d871909 06/47: Use lexical-binding, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 4d92026a1a 07/47: Introduce explicit customization group and linting,
ELPA Syncer <=
- [nongnu] elpa/scad-mode 5dde5cacbf 08/47: Remove scad-prime-dabbrev hack, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode ddd1a64991 11/47: Whitespace, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode f18fb5082d 13/47: Update package header and commentary, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 0cb891b232 18/47: Update commentary, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode b038c79b40 19/47: Rebind keys to support tab completion, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 4bf29ec9b1 20/47: Add preview, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 9c9bb9b5aa 01/47: Initial commit, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode fece897e58 04/47: Delete trailing whitespace, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 25f94cc800 03/47: Require Emacs 26, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 53aba7b6e9 09/47: Fix and simplify completion-at-point-function, ELPA Syncer, 2022/11/12