[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-chibi 9f33e8d 26/38: Fix indentation
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-chibi 9f33e8d 26/38: Fix indentation |
Date: |
Sun, 1 Aug 2021 18:26:19 -0400 (EDT) |
branch: elpa/geiser-chibi
commit 9f33e8d1a17503235b27a5b60d14358b02964ed5
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Fix indentation
---
elisp/geiser-chibi.el | 2 +-
scheme/chibi/geiser/geiser.scm | 266 ++++++++++++++++++++---------------------
scheme/chibi/geiser/geiser.sld | 4 +-
3 files changed, 136 insertions(+), 136 deletions(-)
diff --git a/elisp/geiser-chibi.el b/elisp/geiser-chibi.el
index 190f0f9..e09079f 100644
--- a/elisp/geiser-chibi.el
+++ b/elisp/geiser-chibi.el
@@ -71,7 +71,7 @@ This function uses `geiser-chibi-init-file' if it exists."
(module (cond ((string-equal "'()" (car args))
"'()")
((and (car args))
- (concat "'" (car args)))
+ (concat "'" (car args)))
(t
"#f"))))
(format "(geiser:eval %s '%s)" module form)))
diff --git a/scheme/chibi/geiser/geiser.scm b/scheme/chibi/geiser/geiser.scm
index 571f125..dc7954a 100644
--- a/scheme/chibi/geiser/geiser.scm
+++ b/scheme/chibi/geiser/geiser.scm
@@ -1,4 +1,4 @@
-; -*- geiser-scheme-implementation:chibi; -*-
+;;; -*- geiser-scheme-implementation:chibi; -*-
(define (all-environment-exports environment prefix)
(if environment
(append (filter (lambda (identifier)
@@ -43,36 +43,36 @@
(define (geiser:eval module form . rest)
rest
(guard (err
- (else
- (show #t ; to standard output (to comint)
- "Geiser-chibi falure in scheme code\n")
- (show #t "Error: \n" err "\n")
- (print-stack-trace)))
+ (else
+ (show #t ; to standard output (to comint)
+ "Geiser-chibi falure in scheme code\n")
+ (show #t "Error: \n" err "\n")
+ (print-stack-trace)))
(let* ((output (open-output-string))
- (form-analyzed (analyze form))
- (result (parameterize ((current-output-port output))
- (call/cc (lambda (continuation)
- (with-exception-handler
- (lambda (err)
- (let ((stack-trace (get-stack-trace)))
- (show #t
- "Output (exception): "
- err
- " \nStack trace:\n"
- stack-trace)
- (continuation (write-to-string
- (show #f
- "Result
(exception): "
- err
- "\nStack trace:\n"
- stack-trace)))))
- (lambda () (if module
- (let ((mod (module-env (find-module
module))))
- (eval form-analyzed mod))
- (eval form-analyzed)))))))))
+ (form-analyzed (analyze form))
+ (result (parameterize ((current-output-port output))
+ (call/cc (lambda (continuation)
+ (with-exception-handler
+ (lambda (err)
+ (let ((stack-trace (get-stack-trace)))
+ (show #t
+ "Output (exception): "
+ err
+ " \nStack trace:\n"
+ stack-trace)
+ (continuation (write-to-string
+ (show #f
+ "Result
(exception): "
+ err
+ "\nStack trace:\n"
+ stack-trace)))))
+ (lambda () (if module
+ (let ((mod (module-env (find-module
module))))
+ (eval form-analyzed mod))
+ (eval form-analyzed)))))))))
(write ; to standard output (to comint)
`((result ,(write-to-string result))
- (output . ,(get-output-string output))))))
+ (output . ,(get-output-string output))))))
(values))
@@ -123,16 +123,16 @@
(define (geiser:autodoc ids . rest)
(and #f ( ;; disabled temporarily, because it didn't really work
- rest
- (cond ((null? ids) '())
- ((not (list? ids))
- (geiser:autodoc (list ids)))
- ((not (symbol? (car ids)))
- (geiser:autodoc (cdr ids)))
- (else
- (map (lambda (id)
- (geiser:operator-arglist id))
- ids))))))
+ rest
+ (cond ((null? ids) '())
+ ((not (list? ids))
+ (geiser:autodoc (list ids)))
+ ((not (symbol? (car ids)))
+ (geiser:autodoc (cdr ids)))
+ (else
+ (map (lambda (id)
+ (geiser:operator-arglist id))
+ ids))))))
(define (geiser:no-values)
#f)
@@ -148,13 +148,13 @@
(define (make-location file line)
(list (cons "file"
- (if (string? file)
- (path-resolve
- file
- (current-directory))
- '()))
+ (if (string? file)
+ (path-resolve
+ file
+ (current-directory))
+ '()))
(cons "line" (if (number? line) (+ 1 line) '())))
-)
+ )
@@ -171,72 +171,72 @@
(display "found:")
(newline)
(guard (err
- ((error-object? err)
- (display "Error in geiser:symbol-location:")
- (display (error-object-message err))
- (make-location '() '()))
- (else
- (display "Peculiar error in geiser:symbol-location:")
- (display err)
- (make-location '() '())))
+ ((error-object? err)
+ (display "Error in geiser:symbol-location:")
+ (display (error-object-message err))
+ (make-location '() '()))
+ (else
+ (display "Peculiar error in geiser:symbol-location:")
+ (display err)
+ (make-location '() '())))
(let* ((l-modules-found (modules-exporting-identifier symbol-in-question))
- (result (if (not (equal? l-modules-found '()))
- (let* ((l-selected-module (caar l-modules-found))
- (result (tree-walker
- (module-ast
- (analyze-module
- l-selected-module))
- symbol-in-question)))
- (display (map car l-modules-found))
- (newline)
- result)
- (let ((result (cons '() '())))
- (display "Not found.\n")
- result))))
+ (result (if (not (equal? l-modules-found '()))
+ (let* ((l-selected-module (caar l-modules-found))
+ (result (tree-walker
+ (module-ast
+ (analyze-module
+ l-selected-module))
+ symbol-in-question)))
+ (display (map car l-modules-found))
+ (newline)
+ result)
+ (let ((result (cons '() '())))
+ (display "Not found.\n")
+ result))))
(make-location
(car result)
(- (cdr result) 1) ; Ehh... line numbering in 'make-location starts
from 0
))))
(define (tree-walker node . symbol-in-question)
-; The reason this function used a (let), not a (begin) is that (begin)
-; for some reason does not allow (display)s inside. It
-; works in xfce4-terminal, but not here. I decided not to
-; debug it, since (let () ) "just worked". TODO.
+ ; The reason this function used a
(let), not a (begin) is that (begin)
+ ; for some reason does not allow
(display)s inside. It
+ ; works in xfce4-terminal, but not
here. I decided not to
+ ; debug it, since (let () ) "just
worked". TODO.
(if (pair? node)
- (let ((result
- (tree-walker
- (car node)
- (car symbol-in-question)))
- )
- (if result
- result
- (tree-walker (cdr node) (car symbol-in-question))
- )
- )
+ (let ((result
+ (tree-walker
+ (car node)
+ (car symbol-in-question)))
+ )
+ (if result
+ result
+ (tree-walker (cdr node) (car symbol-in-question))
+ )
+ )
(let () ; we have leaf
- (if (set? node)
- (if (equal? (ref-name (set-var node)) (car symbol-in-question))
- (let
- ((thingy (set-value node)))
- (cond ((lambda? thingy) (lambda->lcons thingy))
- ;((macro? thingy) (error "Macros not supported"))
- (else (set-node->lcons/dirty-trick node))))
- #f)
- #f
- ))))
+ (if (set? node)
+ (if (equal? (ref-name (set-var node)) (car symbol-in-question))
+ (let
+ ((thingy (set-value node)))
+ (cond ((lambda? thingy) (lambda->lcons thingy))
+ ;((macro? thingy) (error "Macros not
supported"))
+ (else (set-node->lcons/dirty-trick node))))
+ #f)
+ #f
+ ))))
(define (lambda->lcons thingy)
(let* ((l-source (lambda-source thingy))
- (l-location
- (if (pair? l-source)
- (cons
- (car l-source)
- (cdr l-source))
- (let ()
- (display "Lambda with no source information.")
- (cons '() '())))))
+ (l-location
+ (if (pair? l-source)
+ (cons
+ (car l-source)
+ (cdr l-source))
+ (let ()
+ (display "Lambda with no source information.")
+ (cons '() '())))))
l-location))
@@ -248,26 +248,26 @@
(define (set-node->lcons/dirty-trick node)
(guard (err
- (else
- (error "set-source dirty trick failed!" )))
- (let* ((l-str-to-check (geiser:write/ss-to-string node))
- (strl (string-length l-str-to-check))
- (l-matches
- (regexp-search
- '(: "(\""
- (-> filename (*? graphic) )
- "\" . "
- (-> lineno (+ num) )
- ")}")
- l-str-to-check ))
- (l-filename
- (regexp-match-submatch l-matches 'filename))
- (l-lineno
- (string->number
- (regexp-match-submatch l-matches 'lineno)))
- (l-location
- (cons l-filename l-lineno)))
- l-location)))
+ (else
+ (error "set-source dirty trick failed!" )))
+ (let* ((l-str-to-check (geiser:write/ss-to-string node))
+ (strl (string-length l-str-to-check))
+ (l-matches
+ (regexp-search
+ '(: "(\""
+ (-> filename (*? graphic) )
+ "\" . "
+ (-> lineno (+ num) )
+ ")}")
+ l-str-to-check ))
+ (l-filename
+ (regexp-match-submatch l-matches 'filename))
+ (l-lineno
+ (string->number
+ (regexp-match-submatch l-matches 'lineno)))
+ (l-location
+ (cons l-filename l-lineno)))
+ l-location)))
@@ -276,21 +276,21 @@
(define (geiser:module-location symbol-representing-module)
(guard ( err
- ((error-object? err)
- (display "Error in module-location:\n")
- (display err)
- (newline)
- (display (error-object-message err))
- (make-location '() '()))
- (else
- (display "Peculiar error!\n")
- (display err)
- (newline)
- (make-location '() '())))
+ ((error-object? err)
+ (display "Error in module-location:\n")
+ (display err)
+ (newline)
+ (display (error-object-message err))
+ (make-location '() '()))
+ (else
+ (display "Peculiar error!\n")
+ (display err)
+ (newline)
+ (make-location '() '())))
(let ((l-module (find-module symbol-representing-module)))
(if (not (equal? l-module '()) )
- (make-location
- (find-module-file
- (module-name->file
- (module-name l-module))) 0 )
- (make-location '() '())))))
+ (make-location
+ (find-module-file
+ (module-name->file
+ (module-name l-module))) 0 )
+ (make-location '() '())))))
diff --git a/scheme/chibi/geiser/geiser.sld b/scheme/chibi/geiser/geiser.sld
index 86f871a..d99e1c1 100644
--- a/scheme/chibi/geiser/geiser.sld
+++ b/scheme/chibi/geiser/geiser.sld
@@ -5,8 +5,8 @@
geiser:autodoc
geiser:module-completions
geiser:no-values
- geiser:symbol-location ; implement this interface in
[[file://./geiser.scm#geiser:symbol-location]] in order to make proper
cross-referencing working.
- geiser:module-location
+ geiser:symbol-location ; implement this interface in
[[file://./geiser.scm#geiser:symbol-location]] in order to make proper
cross-referencing working.
+ geiser:module-location
geiser:newline)
(import
(scheme small)
- [nongnu] elpa/geiser-chibi 354d399 21/38: Allow additional parameters to Chibi binary, (continued)
- [nongnu] elpa/geiser-chibi 354d399 21/38: Allow additional parameters to Chibi binary, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 7606cc3 27/38: Delete trailing whitespace, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi d153c2b 32/38: adapting to new scheme load path, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 9c6afab 36/38: fix for version, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 285d8ba 24/38: Begin the summary lines of all elisp libraries with three semicolons, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 5e7ba0f 25/38: Mark the beginning of code part of elisp libraries with Code: heading, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi bdde589 15/38: Add better support for geiser:symbol-location. Add guards., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi c7beaf1 17/38: Fix a comment typo., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi b92c0c9 19/38: Add a TODO entry for adding output to erroneous evaluations., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 60464d6 22/38: Add a few minor tweaks., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 9f33e8d 26/38: Fix indentation,
Philip Kaludercic <=
- [nongnu] elpa/geiser-chibi 697bf63 30/38: imported files moved to new locations, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 65df173 31/38: license and readme, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi fa3bd28 34/38: preparing MELPA submission, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 7eda792 33/38: typo, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 54e7f38 37/38: fix: auto-activate implementation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 8d7e02a 35/38: fix for homepage, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-chibi 6f59291 38/38: Use new implementation extension declarator, Philip Kaludercic, 2021/08/01