diff options
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r-- | elisp/geiser-syntax.el | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index 264687a..472a4e5 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -32,11 +32,52 @@ ;;; Indentation: -(defun geiser-syntax--setup-scheme-indent () - (let ((defuns '(catch))) - (mapc (lambda (d) (put d 'scheme-indent-function 'defun)) defuns))) - -(geiser-syntax--setup-scheme-indent) +(defmacro geiser-syntax--scheme-indent (&rest pairs) + `(progn ,@(mapcar (lambda (p) + `(put ',(car p) 'scheme-indent-function ',(cadr p))) + pairs))) + +(geiser-syntax--scheme-indent + (begin0 1) + (c-declare 0) + (c-lambda 2) + (case-lambda 0) + (catch defun) + (class defun) + (class* defun) + (compound-unit/sig 0) + (dynamic-wind 0) + (for/fold 2) + (instantiate 2) + (interface 1) + (lambda/kw 1) + (let*-values 1) + (let+ 1) + (let-values 1) + (let/ec 1) + (match defun) + (mixin 2) + (module defun) + (opt-lambda 1) + (parameterize 1) + (parameterize-break 1) + (parameterize* 1) + (pmatch defun) + (quasisyntax/loc 1) + (receive 2) + (send* 1) + (sigaction 1) + (syntax-case 2) + (syntax/loc 1) + (type-case defun) + (unit defun) + (unit/sig 2) + (unless 1) + (when 1) + (while 1) + (with-handlers 1) + (with-method 1) + (with-syntax 1)) ;;; Code parsing: |