[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scad-mode 268a8c46d6 38/47: Remove scad-indent-style, inst
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scad-mode 268a8c46d6 38/47: Remove scad-indent-style, instead configure c-default-style |
Date: |
Sat, 12 Nov 2022 13:59:36 -0500 (EST) |
branch: elpa/scad-mode
commit 268a8c46d610b8108cc9d0f8471963df6a432a25
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Remove scad-indent-style, instead configure c-default-style
---
scad-mode.el | 29 +++++++++--------------------
1 file changed, 9 insertions(+), 20 deletions(-)
diff --git a/scad-mode.el b/scad-mode.el
index 2b254fa8af..f096dfa368 100644
--- a/scad-mode.el
+++ b/scad-mode.el
@@ -34,11 +34,7 @@
;;; Code:
-;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.scad$" . scad-mode))
-
(require 'cc-mode)
-
(eval-when-compile
(require 'cc-langs)
(require 'cc-fonts)
@@ -74,8 +70,7 @@
"norm" "cross"
;;2014.03
"concat" "chr"
;;2015.03
"assert" "ord"
;;2019.05
- "is_undef" "is_list" "is_num" "is_bool" "is_string" "is_function"
;;2019.05 type test
- )
+ "is_undef" "is_list" "is_num" "is_bool" "is_string" "is_function")
;;2019.05 type test
"SCAD functions."
:type '(repeat string))
@@ -94,8 +89,7 @@
"projection"
;;projection.cc
"minkowski" "hull" "resize"
;;cgaladv.cc
"parent_module"
;;2014.03
- "offset" "text"
;;2015.03
- )
+ "offset" "text")
;;2015.03
"SCAD modules."
:type '(repeat string))
@@ -150,12 +144,10 @@ Options are axes, crosshairs, edges, scales, wireframe."
(defvar scad-mode-syntax-table
(let ((st (make-syntax-table)))
- ;; support comment style: “// ...”
- ;; support comment style: “/* ... */”
+ ;; support comment style: // and /* ... */
(modify-syntax-entry ?\/ ". 124b" st)
(modify-syntax-entry ?\n "> b" st)
(modify-syntax-entry ?* ". 23" st)
-
;; Extra punctuation
(modify-syntax-entry ?+ "." st)
(modify-syntax-entry ?- "." st)
@@ -167,13 +159,11 @@ Options are axes, crosshairs, edges, scales, wireframe."
(modify-syntax-entry ?| "." st)
(modify-syntax-entry ?= "." st)
(modify-syntax-entry ?\; "." st)
-
st)
"Syntax table for `scad-mode'.")
(defvar scad-font-lock-keywords
- `(
- ("\\(module\\|function\\)[ \t]+\\(\\sw+\\)" (1 'font-lock-keyword-face
nil) (2 'font-lock-function-name-face nil t))
+ `(("\\(module\\|function\\)[ \t]+\\(\\sw+\\)" (1 'font-lock-keyword-face
nil) (2 'font-lock-function-name-face nil t))
("\\(use\\|include\\)[ \t]*<\\([^>]+\\)>" (1 'font-lock-preprocessor-face
nil) (2 'font-lock-type-face nil t))
("<\\(\\sw+\\)>" (1 'font-lock-builtin-face nil))
("$\\(\\sw+\\)" (1 'font-lock-builtin-face nil))
@@ -189,16 +179,15 @@ Options are axes, crosshairs, edges, scales, wireframe."
(defconst scad-font-lock-keywords-2 scad-font-lock-keywords)
(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.")
-
(defvar scad-completions
(append scad-keywords scad-functions scad-modules)
"List of known words for completion.")
(put 'scad-mode 'c-mode-prefix "scad-")
+
+;;;###autoload
+(add-to-list 'auto-mode-alist '("\\.scad$" . scad-mode))
+
;;;###autoload
(define-derived-mode scad-mode c-mode "SCAD"
"Major mode for editing OpenSCAD code.
@@ -220,7 +209,7 @@ Key bindings:
(use-local-map scad-mode-map)
(c-set-offset (quote cpp-macro) 0 nil)
(c-init-language-vars scad-mode)
- (c-basic-common-init 'scad-mode (or scad-indent-style "k&r"))
+ (c-basic-common-init 'scad-mode c-default-style)
(c-font-lock-init)
(c-run-mode-hooks 'c-mode-common-hook))
- [nongnu] elpa/scad-mode d39d19f64f 24/47: Save before opening/exporting, (continued)
- [nongnu] elpa/scad-mode d39d19f64f 24/47: Save before opening/exporting, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 56a3af8661 37/47: Update keywords, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 710cf2b7ce 45/47: Rename preview output buffer, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 3609ca3ee1 29/47: Use setq-local, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 30e523aa68 05/47: Don't mention Marmalade, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 012e753485 14/47: README: Fix language keyword, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 230302d875 22/47: Update authors, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode ad1254a3de 27/47: Add scad-preview-view, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode ec9bf4c643 30/47: Larger preview image, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 61f306462a 36/47: Version 93.0, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 268a8c46d6 38/47: Remove scad-indent-style, instead configure c-default-style,
ELPA Syncer <=
- [nongnu] elpa/scad-mode ace55270fd 40/47: Add flymake support, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 900ca6fc25 41/47: Update README, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode efc5f1cf14 46/47: Update status if original buffer is dead, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode aa2e76a29b 23/47: Rename mode back, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 1cdc9f304f 26/47: README: Update badges, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 28879e735c 33/47: Update status if preview is stale, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode b0d138e9ec 43/47: Print warning if the scad-preview package is installed, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode e5ed92217e 10/47: Cleanup mode map, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 311797dc44 15/47: Commentary: Remove old todos, ELPA Syncer, 2022/11/12
- [nongnu] elpa/scad-mode 2c9124f718 16/47: Remove some publicly exposed variables, ELPA Syncer, 2022/11/12