summaryrefslogtreecommitdiff
path: root/elisp/geiser-syntax.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r--elisp/geiser-syntax.el52
1 files changed, 26 insertions, 26 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index 7870d3b..53c2c74 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -219,14 +219,14 @@ implementation-specific entries for font-lock-keywords.")
((equal (symbol-name tok) "f") '(boolean . :f))
(tok (cons 'atom tok))
(t (geiser-syntax--read/next-token)))))))
- (?| (case (geiser-syntax--read/next-char) ;; gambit style block comments
- ('nil '(eob))
- (?# (geiser-syntax--read/skip-comment))
- (t (let ((tok (geiser-syntax--read/symbol)))
- (cond ((equal (symbol-name tok) "t") '(boolean . :t))
- ((equal (symbol-name tok) "f") '(boolean . :f))
- (tok (cons 'atom tok))
- (t (geiser-syntax--read/next-token)))))))
+ (?| (case (geiser-syntax--read/next-char) ;; gambit style block comments
+ ('nil '(eob))
+ (?# (geiser-syntax--read/skip-comment))
+ (t (let ((tok (geiser-syntax--read/symbol)))
+ (cond ((equal (symbol-name tok) "t") '(boolean . :t))
+ ((equal (symbol-name tok) "f") '(boolean . :f))
+ (tok (cons 'atom tok))
+ (t (geiser-syntax--read/next-token)))))))
(?\' (geiser-syntax--read/token '(quote . quote)))
(?\` (geiser-syntax--read/token
`(backquote . ,backquote-backquote-symbol)))
@@ -399,28 +399,28 @@ implementation-specific entries for font-lock-keywords.")
(defun geiser-syntax--linearize (form)
(cond ((not (listp form)) (list form))
- ((null form) nil)
- (t (cons (car form) (geiser-syntax--linearize (cdr form))))))
+ ((null form) nil)
+ (t (cons (car form) (geiser-syntax--linearize (cdr form))))))
(defun geiser-syntax--scan-locals (bfs sbfs form nesting locals)
(if (or (null form) (not (listp form)))
(geiser-syntax--normalize locals)
(if (not (geiser-syntax--binding-form-p bfs sbfs (car form)))
- (geiser-syntax--scan-locals bfs sbfs
- (car (last form))
+ (geiser-syntax--scan-locals bfs sbfs
+ (car (last form))
(1- nesting) locals)
(let* ((head (car form))
- (name (geiser-syntax--if-symbol (cadr form)))
- (names (if name (geiser-syntax--if-list (caddr form))
- (geiser-syntax--if-list (cadr form))))
+ (name (geiser-syntax--if-symbol (cadr form)))
+ (names (if name (geiser-syntax--if-list (caddr form))
+ (geiser-syntax--if-list (cadr form))))
(bns (and name
(geiser-syntax--binding-form-p bfs sbfs (car names))))
- (rest (if (and name (not bns)) (cdddr form) (cddr form)))
- (use-names (and (or rest
+ (rest (if (and name (not bns)) (cdddr form) (cddr form)))
+ (use-names (and (or rest
(< nesting 1)
(geiser-syntax--binding-form*-p sbfs head))
(not bns))))
- (when name (push name locals))
+ (when name (push name locals))
(when (geiser-syntax--symbol-eq head 'case-lambda)
(dolist (n (and (> nesting 0) (caar (last form))))
(when n (push n locals)))
@@ -430,19 +430,19 @@ implementation-specific entries for font-lock-keywords.")
(dolist (n (and (> nesting 0) (cdaar (last form))))
(when n (push n locals)))
(setq rest (and (> nesting 0) (cdr form))))
- (when use-names
- (dolist (n (geiser-syntax--linearize names))
+ (when use-names
+ (dolist (n (geiser-syntax--linearize names))
(let ((xs (if (and (listp n) (listp (car n))) (car n) (list n))))
(dolist (x xs) (when x (push x locals))))))
- (dolist (f (butlast rest))
- (when (and (listp f)
+ (dolist (f (butlast rest))
+ (when (and (listp f)
(geiser-syntax--symbol-eq (car f) 'define)
(cadr f))
- (push (cadr f) locals)))
- (geiser-syntax--scan-locals bfs sbfs
- (car (last (or rest names)))
+ (push (cadr f) locals)))
+ (geiser-syntax--scan-locals bfs sbfs
+ (car (last (or rest names)))
(1- nesting)
- locals)))))
+ locals)))))
(defun geiser-syntax--locals-around-point (bfs sbfs)
(when (eq major-mode 'scheme-mode)