Skip to content

Commit

Permalink
Improve for-each indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bamboo committed Dec 1, 2024
1 parent 331f250 commit 972da16
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 42 deletions.
9 changes: 4 additions & 5 deletions demo/addons/s7/lib/prelude.scm
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
(define (require . symbols)
"Loads a library from addons/s7/lib if it hasn't been loaded yet."
(for-each
(lambda (symbol)
(when (not (provided? symbol))
(load-library (symbol->string symbol))))
symbols))

(lambda (symbol)
(when (not (provided? symbol))
(load-library (symbol->string symbol))))
symbols))
77 changes: 40 additions & 37 deletions emacs/geiser-godot-s7.el
Original file line number Diff line number Diff line change
Expand Up @@ -203,49 +203,52 @@ good candidate for an entry in your project's .dir-locals.el."
;;; Keywords and syntax

(defconst geiser-godot-s7--builtin-keywords
'("call-with-input-file"
"call-with-input-string"
"call-with-output-file"
"call-with-output-string"
"with-output-to-string"
"define*"
"define-macro*"
"define-bacro"
"define-bacro*"
"define-constant"
"lambda*"
"set!"
"call!"
"inc!"
"connect!"
"disconnect!"
"$"
"require"
"provide"
"import"
"import-class"
"define-signal"
))
'(
"call-with-input-file"
"call-with-input-string"
"call-with-output-file"
"call-with-output-string"
"with-output-to-string"
"define*"
"define-macro*"
"define-bacro"
"define-bacro*"
"define-constant"
"for-each"
"lambda*"
"set!"
"call!"
"inc!"
"connect!"
"disconnect!"
"$"
"require"
"provide"
"import"
"import-class"
"define-signal"
))

(defun geiser-godot-s7--keywords ()
"Return Godot s7-specific scheme keywords."
(append
(geiser-syntax--simple-keywords geiser-godot-s7-extra-keywords)
(geiser-syntax--simple-keywords geiser-godot-s7--builtin-keywords)))
(geiser-syntax--simple-keywords geiser-godot-s7-extra-keywords)
(geiser-syntax--simple-keywords geiser-godot-s7--builtin-keywords)))

(geiser-syntax--scheme-indent
(call-with-input-string 1)
(call-with-output-string 0)
(call-with-exit 0)
(define* 1)
(define-macro* 1)
(define-bacro 1)
(define-bacro* 1)
(lambda* 1)
(doto 1)
(with-let 1)
(when-let 1)
(with-output-to-string 0))
(call-with-input-string 1)
(call-with-output-string 0)
(call-with-exit 0)
(define* 1)
(define-macro* 1)
(define-bacro 1)
(define-bacro* 1)
(lambda* 1)
(doto 1)
(for-each 0)
(with-let 1)
(when-let 1)
(with-output-to-string 0))


;;; REPL startup
Expand Down

0 comments on commit 972da16

Please sign in to comment.