summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2012-10-24 04:17:19 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2012-10-24 04:17:23 +0200
commit08b4499a0c440279257b38d49003ea5a6c848a45 (patch)
treeddbebde0e11d3e9d8f26d98df69dc0354fa8d12b /elisp
parentfd71a43c2be7f86e7b68d2badca6030103f54f05 (diff)
downloadgeiser-guile-08b4499a0c440279257b38d49003ea5a6c848a45.tar.gz
geiser-guile-08b4499a0c440279257b38d49003ea5a6c848a45.tar.bz2
Little clean-ups to the indentation rules
Splitting better the specially indented forms between our two implementations, so that users of a single one don't get weird indentations for froms without a special meaning in their scheme. Ideally, we should make these indentation rules buffer-local, so that when a user is in a, say, Guile buffer, module+ has no special indentation (as is the case now if that user also has activated support for Racket).
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-guile.el14
-rw-r--r--elisp/geiser-racket.el77
-rw-r--r--elisp/geiser-syntax.el36
3 files changed, 66 insertions, 61 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index 54443b8..00c44d5 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -237,12 +237,24 @@ This function uses `geiser-guile-init-file' if it exists."
(re-search-forward geiser-guile--guess-re nil t)))
-;;; Keywords
+;;; Keywords and syntax
+
(defun geiser-guile--keywords ()
(when geiser-guile-extra-keywords
`((,(format "[[(]%s\\>" (regexp-opt geiser-guile-extra-keywords 1))
. 1))))
+(geiser-syntax--scheme-indent
+ (c-declare 0)
+ (c-lambda 2)
+ (pmatch defun)
+ (sigaction 1)
+ (with-fluid* 1)
+ (with-fluids 1)
+ (with-fluids* 1)
+ (with-method 1))
+
+
;;; Compilation shell regexps
diff --git a/elisp/geiser-racket.el b/elisp/geiser-racket.el
index fe4b578..a5b2f37 100644
--- a/elisp/geiser-racket.el
+++ b/elisp/geiser-racket.el
@@ -253,6 +253,7 @@ using start-geiser, a procedure in the geiser/server module."
;;; Keywords and syntax
+
(defun geiser-racket--keywords ()
(append '(("^#lang\\>" . 0)
("\\[\\(else\\)\\>" . 1))
@@ -261,30 +262,12 @@ using start-geiser, a procedure in the geiser/server module."
. 1)))))
(geiser-syntax--scheme-indent
- (splicing-let 1)
- (splicing-letrec 1)
- (splicing-let-values 1)
- (splicing-letrec-values 1)
- (splicing-let-syntax 1)
- (splicing-letrec-syntax 1)
- (splicing-let-syntaxes 1)
- (splicing-letrec-syntaxes 1)
- (splicing-letrec-syntaxes+values 1)
- (splicing-local 1)
+ (begin0 1)
+ (case-lambda: 0)
+ (class* defun)
+ (compound-unit/sig 0)
+ (define: defun)
(for 1)
- (for/and 1)
- (for/first 1)
- (for/fold 2)
- (for/hash 1)
- (for/hasheq 1)
- (for/hasheqv 1)
- (for/last 1)
- (for/list 1)
- (for/lists 2)
- (for/or 1)
- (for/product 1)
- (for/sum 1)
- (for/vector 1)
(for* 1)
(for*/and 1)
(for*/first 1)
@@ -299,7 +282,53 @@ using start-geiser, a procedure in the geiser/server module."
(for*/product 1)
(for*/sum 1)
(for*/vector 1)
- (module+ defun))
+ (for/and 1)
+ (for/first 1)
+ (for/fold 2)
+ (for/hash 1)
+ (for/hasheq 1)
+ (for/hasheqv 1)
+ (for/last 1)
+ (for/list 1)
+ (for/lists 2)
+ (for/or 1)
+ (for/product 1)
+ (for/sum 1)
+ (for/vector 1)
+ (instantiate 2)
+ (interface 1)
+ (lambda/kw 1)
+ (lambda: 1)
+ (let*-values: 1)
+ (let+ 1)
+ (let-values: 1)
+ (let/cc: 1)
+ (let: 1)
+ (letrec-values: 1)
+ (letrec: 1)
+ (mixin 2)
+ (module defun)
+ (module+ defun)
+ (parameterize-break 1)
+ (quasisyntax/loc 1)
+ (send* 1)
+ (splicing-let 1)
+ (splicing-let-syntax 1)
+ (splicing-let-syntaxes 1)
+ (splicing-let-values 1)
+ (splicing-letrec 1)
+ (splicing-letrec-syntax 1)
+ (splicing-letrec-syntaxes 1)
+ (splicing-letrec-syntaxes+values 1)
+ (splicing-letrec-values 1)
+ (splicing-local 1)
+ (syntax-id-rules defun)
+ (syntax/loc 1)
+ (type-case defun)
+ (unit defun)
+ (unit/sig 2)
+ (with-handlers 1)
+ (with-handlers: 1))
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index 162d909..46ee350 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -28,60 +28,24 @@
pairs)))
(geiser-syntax--scheme-indent
- (begin0 1)
- (c-declare 0)
- (c-lambda 2)
(case-lambda 0)
- (case-lambda: 0)
(catch defun)
(class defun)
- (class* defun)
- (compound-unit/sig 0)
- (define: defun)
(dynamic-wind 0)
- (instantiate 2)
- (interface 1)
- (lambda: 1)
- (lambda/kw 1)
(let*-values 1)
- (let*-values: 1)
- (let+ 1)
- (let: 1)
- (letrec: 1)
(letrec* 1)
(letrec-values 1)
- (letrec-values: 1)
(let-values 1)
- (let-values: 1)
- (let/cc: 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-id-rules defun)
- (syntax/loc 1)
- (type-case defun)
- (unit defun)
- (unit/sig 2)
(unless 1)
(when 1)
(while 1)
- (with-fluid* 1)
- (with-fluids 1)
- (with-fluids* 1)
- (with-handlers 1)
- (with-handlers: 1)
- (with-method 1)
(with-error-to-port 1)
(with-syntax 1))