summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-base.el5
-rw-r--r--elisp/geiser-plt.el44
-rw-r--r--elisp/geiser-syntax.el51
3 files changed, 46 insertions, 54 deletions
diff --git a/elisp/geiser-base.el b/elisp/geiser-base.el
index 4133245..362930d 100644
--- a/elisp/geiser-base.el
+++ b/elisp/geiser-base.el
@@ -97,11 +97,6 @@
(insert str)
(put-text-property p (point) 'face face)))
-(defmacro geiser--scheme-indent (&rest pairs)
- `(progn ,@(mapcar (lambda (p)
- `(put ',(car p) 'scheme-indent-function ',(cadr p)))
- pairs)))
-
(provide 'geiser-base)
;;; geiser-base.el ends here
diff --git a/elisp/geiser-plt.el b/elisp/geiser-plt.el
index e60a576..44312b9 100644
--- a/elisp/geiser-plt.el
+++ b/elisp/geiser-plt.el
@@ -138,49 +138,5 @@ This function uses `geiser-plt-init-file' if it exists."
(string-equal (file-name-extension (buffer-file-name)) "ss")))
-;;; Emacs tweaks for PLT scheme code:
-
-(geiser--scheme-indent
- (begin0 1)
- (c-declare 0)
- (c-lambda 2)
- (case-lambda 0)
- (catch 1)
- (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)
- (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))
-
-
(provide 'geiser-plt)
;;; geiser-plt.el ends here
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: