summaryrefslogtreecommitdiff
path: root/elisp/geiser-syntax.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-10 21:08:34 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-10 21:08:34 +0200
commit56598777f2c0a50ca78065d284f2d9c8a9c4fb98 (patch)
tree8bd7c2f55e5d1455e946878b7fc7e66498ed4563 /elisp/geiser-syntax.el
parent26929de58ec387bcdac0010067c310dbc6ff0d2a (diff)
downloadgeiser-guile-56598777f2c0a50ca78065d284f2d9c8a9c4fb98.tar.gz
geiser-guile-56598777f2c0a50ca78065d284f2d9c8a9c4fb98.tar.bz2
Share scheme-indent-function tweaks across implementations.
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r--elisp/geiser-syntax.el51
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: