summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2015-02-09 04:14:49 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2015-02-09 06:03:12 +0100
commit3dd68414304fede65cb3f0c7951d813bb7b0f792 (patch)
tree8943b3bccd79b30615d85c2ad9a53ccf3cbc144a
parent383585e44e56be0e690ad96895f73abf8454d3be (diff)
downloadgeiser-chez-3dd68414304fede65cb3f0c7951d813bb7b0f792.tar.gz
geiser-chez-3dd68414304fede65cb3f0c7951d813bb7b0f792.tar.bz2
Documentation updates and nits for Freija
Preparing the release of 0.7, which will feature support for Chicken thanks to Dan and Freija!
-rw-r--r--AUTHORS5
-rw-r--r--NEWS10
-rw-r--r--README13
-rw-r--r--README.elpa2
-rw-r--r--THANKS4
-rw-r--r--doc/install.texi14
-rw-r--r--doc/intro.texi14
-rw-r--r--doc/macros.texi12
-rw-r--r--doc/repl.texi55
-rw-r--r--doc/thanks.texi4
-rw-r--r--elisp/geiser-base.el4
-rw-r--r--elisp/geiser-chicken.el18
-rw-r--r--elisp/geiser-impl.el2
-rw-r--r--elisp/geiser.el2
-rw-r--r--scheme/chicken/geiser/emacs.scm129
15 files changed, 169 insertions, 119 deletions
diff --git a/AUTHORS b/AUTHORS
index fecd39d..527650e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,6 +1,8 @@
Jose A. Ortega Ruiz <jao@gnu.org> designed and implemented Geiser and
is its active maintainer. For more boring details about him, see
-<http://hacks-galore.org/jao>.
+<http://jao.io>.
+
+Daniel J. Leslie implemented Geiser's support for Chicken.
Contributors:
@@ -11,6 +13,5 @@ Ray Racine
Nick Parker
Darren Hoo
Ludovic Courtès
-Daniel J. Leslie
See also <https://github.com/jaor/geiser/contributors>.
diff --git a/NEWS b/NEWS
index 76c285e..34796d6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,12 @@
-* Version 0.6.1
+* Version 0.7 "Freija"
+
+ This release is dedicated to Dan's three-months-old daughter Freija,
+ who shared her dad's lap with his laptop while he was hacking on the
+ new Chicken scheme support for Geiser.
+
+ New features:
+
+ - Chicken support, by Dan Leslie.
Improved features:
diff --git a/README b/README
index cc8bf7e..0a577a7 100644
--- a/README
+++ b/README
@@ -31,7 +31,7 @@
Geiser needs Emacs 23.2 or better, and at least one of the
supported scheme implementations:
- Guile 2.0 or better.
- - PLT Racket 5.3 or better.
+ - PLT Racket 6.0 or better.
- Chicken 4.8.0 or better.
* Installation
@@ -43,8 +43,15 @@
or byte-compiled and installed after perfoming the standard
configure/make/make install dance. See the INSTALL file for more details.
- Chicken Scheme requires additional steps which are detailed in the INSTALL
- file and the README.elpa file.
+** Chicken Addendum
+ These steps are necessary to fully support Chicken Scheme, but are
+ not required for any other scheme.
+
+ - Install the necessary support eggs:
+ $ chicken-install -s apropos chicken-doc
+ - Update the Chicken documentation database:
+ $ cd `csi -p '(chicken-home)'`
+ $ curl http://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx
* Basic configuration
diff --git a/README.elpa b/README.elpa
index e470dcc..c164ede 100644
--- a/README.elpa
+++ b/README.elpa
@@ -49,4 +49,4 @@ Chicken Addendum:
See http://www.nongnu.org/geiser/ for the full manual in HTML form, or
the the info manual installed by this package.
-Author: http://hacks-galore.org/jao
+Author: http://jao.io
diff --git a/THANKS b/THANKS
index 80eaa1d..79e414d 100644
--- a/THANKS
+++ b/THANKS
@@ -1,3 +1,7 @@
+Dan Leslie, with the help of his three-months old daughter Freija,
+proved there's a smidgen of sense in this madness by adding support
+for Chicken to version 0.7 of Geiser, several years after it was born.
+
Andy Wingo, Geiser's first user, has been a continuous source of
encouragement and suggestions, and keeps improving Guile and heeding
my feature requests.
diff --git a/doc/install.texi b/doc/install.texi
index 095d1ff..d88a22b 100644
--- a/doc/install.texi
+++ b/doc/install.texi
@@ -24,6 +24,8 @@ namely:
@item
@uref{http://www.gnu.org/software/guile, Guile} @value{GUILE_VERSION} or
better
+@item
+@uref{http://call-cc.org, Chicken} @value{CHICKEN_VERSION} or better
@end itemize
Since Geiser supports multiple REPLs, having both of them will just add
@@ -73,7 +75,17 @@ M-x package-install RET geiser RET
Alternatively, you can manually download the @uref{@value{PACKAGE},
package file}, and install from your local disk with @kbd{M-x
-package-install-file}
+package-install-file}.
+
+@cindex Chicken
+@cindex Chicken installation
+If you plan to use Chicken, you'll need also to fire a terminal and
+configure a couple of Chicken eggs:
+@example
+$ chicken-install -s apropos chicken-doc
+$ cd `csi -p '(chicken-home)'`
+$ curl http://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx
+@end example
With that, you are pretty much all set up. See @ref{The REPL} to start
using Geiser.
diff --git a/doc/intro.texi b/doc/intro.texi
index 00207cd..0e92513 100644
--- a/doc/intro.texi
+++ b/doc/intro.texi
@@ -40,12 +40,14 @@ implementation itself).
If your favourite Scheme supports the above modus operandi, it has all
that's needed for a bare-bones Geiser mode. But Geiser can, and will,
use any metadata available: procedure arities and argument lists to
-display interactive help, documentation strings, location information to
-jump to definitions, export lists to provide completion, and so on and
-so forth. Although this is not an all-or-none proposition (Geiser can
-operate with just part of that functionality available), i've initially
-concentrated in supporting those Schemes with the richest (to my
-knowledge) introspection capabilities, namely, Guile and Racket.
+display interactive help, documentation strings, location information
+to jump to definitions, export lists to provide completion, and so on
+and so forth. Although this is not an all-or-none proposition (Geiser
+can operate with just part of that functionality available), i
+initially concentrated in supporting those Schemes with the richest
+(to my knowledge) introspection capabilities, namely, Guile and
+Racket. Later on, Dan Leslie added support for Chicken, and there's
+active work to add support for scsh.
@node Showing off, , Modus operandi, Introduction
@section Showing off
diff --git a/doc/macros.texi b/doc/macros.texi
index 47ea304..e20a94a 100644
--- a/doc/macros.texi
+++ b/doc/macros.texi
@@ -1,7 +1,9 @@
-@set VERSION 0.6
-@set RELEASE_DATE August 2014
+@set VERSION 0.7
+@set VERSION_NICK Freija
+@set RELEASE_DATE February 2015
@set GUILE_VERSION 2.0.9
@set RACKET_VERSION 6.0
+@set CHICKEN_VERSION 4.8.0
@set EMACS_VERSION 23.2
@set DOWN_BASE http://download.savannah.gnu.org/@/releases/@/geiser
@set PACKAGE_REPO @value{DOWN_BASE}/@/packages
@@ -12,19 +14,19 @@
@uref{@value{DOWN_BASE}/@/@value{VERSION}/@/\FILE\, \CAPT\}
@end macro
-@macro vblurb{GVERS, RVERS, DATE}
+@macro vblurb{GVERS, CVERS, RVERS, DATE}
@html
<div class="version" align="right">
@end html
@downfile{@value{TARBALL},
- Version @value{VERSION} (\DATE\) Guile \GVERS\+ and Racket \RVERS\+}
+ Version @value{VERSION} ``@value{VERSION_NICK}'' (\DATE\) Guile \GVERS\+ Chicken \CVERS\+ and Racket \RVERS\+}
@html
</div>
@end html
@end macro
@macro dvblurb{}
-@vblurb{@value{GUILE_VERSION}, @value{RACKET_VERSION}, @value{RELEASE_DATE}}
+@vblurb{@value{GUILE_VERSION}, @value{CHICKEN_VERSION}, @value{RACKET_VERSION}, @value{RELEASE_DATE}}
@end macro
@macro altr{LINK, TXT, TLINK, TRAIL}
diff --git a/doc/repl.texi b/doc/repl.texi
index ad10202..7fa395b 100644
--- a/doc/repl.texi
+++ b/doc/repl.texi
@@ -43,14 +43,15 @@ is, as described in
Returning to our REPL, the first thing to notice is that the funny
prompt is telling you your current module: its name is the part just
after the @@ sign (in Guile, that means @code{guile-user}, while
-Racket's top namespace doesn't have a name; cf. discussion in
-@altr{Switching context,,Switching context,).} Other than that, this is
-pretty much equivalent to having a command-line interpreter in a
-terminal, with a bunch of add-ons that we'll be reviewing below. You
-can start typing sexps right there: Geiser will only dispatch them for
-evaluation when they're complete, and will indent new lines properly
-until then. It will also keep track of your input, maintaining a
-history file that will be reloaded whenever you restart the REPL.
+Racket's and Chicken's top namespaces don't have a name;
+cf. discussion in @altr{Switching context,,Switching context,).} Other
+than that, this is pretty much equivalent to having a command-line
+interpreter in a terminal, with a bunch of add-ons that we'll be
+reviewing below. You can start typing sexps right there: Geiser will
+only dispatch them for evaluation when they're complete, and will
+indent new lines properly until then. It will also keep track of your
+input, maintaining a history file that will be reloaded whenever you
+restart the REPL.
@cindex REPL, faces
@cindex faces, in the REPL
@@ -153,12 +154,12 @@ In tune with Geiser's
@ifnothtml
@i{modus operandi},
@end ifnothtml
-evaluations in the REPL take place in the namespace of the
-current module. As noted above, the REPL's prompt tells you the name of
-the current module. To switch to a different one, you can use the
-command @command{switch-to-geiser-module}, bound to @kbd{C-c C-m}.
-You'll notice that Geiser simply uses a couple of meta-commands provided
-by the Scheme REPL (the stock @command{,m} in Guile and the
+evaluations in the REPL take place in the namespace of the current
+module. As noted above, the REPL's prompt tells you the name of the
+current module. To switch to a different one, you can use the command
+@command{switch-to-geiser-module}, bound to @kbd{C-c C-m}. You'll
+notice that Geiser simply uses a couple of meta-commands provided by
+the Scheme REPL (the stock @command{,m} in Guile and Chicken and the
(geiser-defined) @command{,enter} in Racket), and that it doesn't even
try to hide that fact. That means that you can freely use said native
ways directly at the REPL, and Geiser will be happy to oblige. In
@@ -166,8 +167,8 @@ Racket, @command{,enter} works like Racket's standard @code{enter!}
form, but you can also provide a path string as its argument (e.g.,
@command{,enter "/tmp/foo.rkt"} is equivalent to @command{,enter (file
"/tmp/foo.rkt")}). Like @code{enter!}, @command{,enter} accepts also
-module names (as in, say, @command{,enter geiser/main}). As mentioned,
-Guile's @command{,m} is used @i{as is}.
+module names (as in, say, @command{,enter geiser/main}). As
+mentioned, in Guile and Chicken, @command{,m} is used @i{as is}.
@cindex current module, change
Once you enter a new module, only those bindings visible in its
@@ -246,15 +247,15 @@ represented by a list made up of its name and that value. When the
argument is a keyword argument, its name has ``#:'' as a prefix.
@cindex help on identifier
-If that's not enough documentation for you, @kbd{C-c C-d d} will open a
-separate documentation buffer with help on the symbol at point. This
-buffer will contain implementation-specific information about the
-identifier (e.g., its docstring for Guile, or its contract, if any, for
-Racket), and a handy button to open the corresponding manual entry for
-the symbol, which will open an HTML page (for Racket) or the texinfo
-manual (for Guile). If you'd rather go directly to the manual, try
-@kbd{C-c C-d i}, which invokes @code{geiser-doc-look-up-manual} as the
-handy button does.
+If that's not enough documentation for you, @kbd{C-c C-d d} will open
+a separate documentation buffer with help on the symbol at point.
+This buffer will contain implementation-specific information about the
+identifier (e.g., its docstring for Guile, or its contract, if any,
+for Racket), and a handy button to open the corresponding manual entry
+for the symbol, which will open an HTML page (for Racket and Chicken)
+or the texinfo manual (for Guile). If you'd rather go directly to the
+manual, try @kbd{C-c C-d i}, which invokes
+@code{geiser-doc-look-up-manual} as the handy button does.
@cindex module exports
@anchor{repl-mod} Geiser can also produce for you a list, classified by
@@ -285,8 +286,8 @@ the file where it's defined will be opened for you.
@section Seeing is believing
@cindex image support
-In schemes that support images as values (currently, that means Racket),
-the REPL will display them inline if you're using them in a
+In schemes that support images as values (currently, that means
+Racket), the REPL will display them inline if you're using them in a
graphics-aware Emacs.
@imgc{repl-images}
diff --git a/doc/thanks.texi b/doc/thanks.texi
index f1015ab..af8b2bf 100644
--- a/doc/thanks.texi
+++ b/doc/thanks.texi
@@ -1,6 +1,10 @@
@node No hacker is an island, Index, Cheat sheet, Top
@chapter No hacker is an island
@cindex thanks
+Dan Leslie, with the help of his three-months old daughter Freija,
+proved there's a smidgen of sense in this madness by adding support
+for Chicken to version 0.7 of Geiser, several years after it was born.
+
Andy Wingo, Geiser's first user, has been a continuous source of
encouragement and suggestions, and keeps improving Guile and heeding
my feature requests.
diff --git a/elisp/geiser-base.el b/elisp/geiser-base.el
index e564b0f..034e595 100644
--- a/elisp/geiser-base.el
+++ b/elisp/geiser-base.el
@@ -1,6 +1,6 @@
;;; geiser-base.el --- shared bits
-;; Copyright (C) 2009, 2010, 2012, 2013 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2012, 2013, 2015 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -14,6 +14,8 @@
;;; Emacs compatibility:
+(require 'ring)
+
(eval-after-load "ring"
'(when (not (fboundp 'ring-member))
(defun ring-member (ring item)
diff --git a/elisp/geiser-chicken.el b/elisp/geiser-chicken.el
index 8abdec3..a797e07 100644
--- a/elisp/geiser-chicken.el
+++ b/elisp/geiser-chicken.el
@@ -1,6 +1,6 @@
;; geiser-chicken.el -- chicken's implementation of the geiser protocols
-;; Copyright (C) 2014 Daniel Leslie
+;; Copyright (C) 2014, 2015 Daniel Leslie
;; Based on geiser-guile.el by Jose Antonio Ortego Ruize
@@ -31,11 +31,11 @@
'("and-let*" "assume" "compiler-typecase" "cond-expand" "condition-case"
"cut" "cute" "declare" "define-constant" "define-inline" "define-interface"
"define-record" "define-record-type" "define-specialization"
- "define-syntax-rule" "define-type" "define-values" "dotimes" "ecase"
- "fluid-let" "foreign-lambda" "foreign-lambda*" "foreign-primitive"
+ "define-syntax-rule" "define-type" "define-values" "dotimes" "ecase"
+ "fluid-let" "foreign-lambda" "foreign-lambda*" "foreign-primitive"
"foreign-safe-lambda" "foreign-safe-lambda*" "functor" "handle-exceptions"
- "import" "let*-values" "let-location" "let-optionals" "let-optionals*"
- "let-values" "letrec*" "letrec-values" "match-letrec" "module"
+ "import" "let*-values" "let-location" "let-optionals" "let-optionals*"
+ "let-values" "letrec*" "letrec-values" "match-letrec" "module"
"parameterize" "regex-case" "require-extension" "select" "set!"
"unless" "use" "when" "with-input-from-pipe" "match" "match-lambda"
"match-lambda*" "match-let" "match-let*" "receive"))
@@ -117,9 +117,9 @@ This function uses `geiser-chicken-init-file' if it exists."
(format ",geiser-eval %s %s" (or (car args) "#f") form)))
((load-file compile-file)
(format ",geiser-load-file %s" (car args)))
- ((no-values)
+ ((no-values)
",geiser-no-values")
- (t
+ (t
(let ((form (mapconcat 'identity args " ")))
(format "(geiser-%s %s)" proc form))))))
;;(message fmt)
@@ -249,7 +249,7 @@ This function uses `geiser-chicken-init-file' if it exists."
(defconst geiser-chicken-minimum-version "4.8.0.0")
(defun geiser-chicken--version (binary)
- (shell-command-to-string (format "%s -e \"(display (chicken-version))\""
+ (shell-command-to-string (format "%s -e \"(display (chicken-version))\""
binary)))
(defun connect-to-chicken ()
@@ -260,7 +260,7 @@ This function uses `geiser-chicken-init-file' if it exists."
(defun geiser-chicken--startup (remote)
(compilation-setup t)
(let ((geiser-log-verbose-p t))
- (geiser-eval--send/wait (format "(load \"%s\")\n"
+ (geiser-eval--send/wait (format "(load \"%s\")\n"
(expand-file-name "chicken/geiser/emacs.scm" geiser-scheme-dir)))))
;;; Implementation definition:
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el
index d2b440a..3679483 100644
--- a/elisp/geiser-impl.el
+++ b/elisp/geiser-impl.el
@@ -1,6 +1,6 @@
;; geiser-impl.el -- generic support for scheme implementations
-;; Copyright (C) 2009, 2010, 2012, 2013 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2012, 2013, 2015 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
diff --git a/elisp/geiser.el b/elisp/geiser.el
index fb5b46a..530358c 100644
--- a/elisp/geiser.el
+++ b/elisp/geiser.el
@@ -1,6 +1,6 @@
;;; geiser.el --- GNU Emacs and Scheme talk to each other
-;; Copyright (C) 2009, 2010, 2011, 2012, 2013 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2015 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
diff --git a/scheme/chicken/geiser/emacs.scm b/scheme/chicken/geiser/emacs.scm
index 8ec6bf5..05c5101 100644
--- a/scheme/chicken/geiser/emacs.scm
+++ b/scheme/chicken/geiser/emacs.scm
@@ -1,3 +1,10 @@
+;; Copyright (C) 2015 Daniel J Leslie
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the Modified BSD License. You should
+;; have received a copy of the license along with this program. If
+;; not, see <http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5>.
+
(module geiser
;; A bunch of these needn't be toplevel functions
(geiser-eval
@@ -22,11 +29,11 @@
make-geiser-toplevel-bindings)
;; Necessary built in units
- (import chicken
- scheme
- extras
- data-structures
- ports
+ (import chicken
+ scheme
+ extras
+ data-structures
+ ports
csi
irregex
srfi-1
@@ -40,7 +47,7 @@
srfi-18)
(define use-debug-log #f)
-
+
(if use-debug-log
(use posix))
@@ -78,12 +85,12 @@
imag-part real-part magnitude numerator denominator
scheme-report-environment null-environment interaction-environment
else)))
-
+
(define geiser-r5rs-symbols
(make-parameter
- '(abs acos and angle append apply asin assoc assq assv atan begin
- boolean? caar cadr call-with-current-continuation
- call-with-input-file call-with-output-file call-with-values
+ '(abs acos and angle append apply asin assoc assq assv atan begin
+ boolean? caar cadr call-with-current-continuation
+ call-with-input-file call-with-output-file call-with-values
car case cdddar cddddr cdr ceiling char->integer char-alphabetic?
char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase
char-lower-case? char-numeric? char-ready? char-upcase
@@ -94,25 +101,25 @@
equal? eqv? eval even? exact->inexact exact? exp expt floor
for-each force gcd if imag-part inexact->exact inexact? input-port?
integer->char integer? interaction-environment lambda lcm length
- let let* let-syntax letrec letrec-syntax list list->string
+ let let* let-syntax letrec letrec-syntax list list->string
list->vector list-ref list-tail list? load log magnitude make-polar
- make-rectangular make-string make-vector map max member memq memv
- min modulo negative? newline not null-environment null?
- number->string number? numerator odd? open-input-file
- open-output-file or output-port? pair? peek-char port? positive?
- procedure? quasiquote quote quotient rational? rationalize read
- read-char real-part real? remainder reverse round
- scheme-report-environment set! set-car! set-cdr! setcar sin sqrt
- string string->list string->number string->symbol string-append
- string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>?
- string-copy string-fill! string-length string-ref string-set!
- string<=? string<? string=? string>=? string>? string? substring
- symbol->string symbol? syntax-rules tan transcript-off transcript-on
- truncate values vector vector->list vector-fill! vector-length
- vector-ref vector-set! vector? with-input-from-file with-output-to-file
+ make-rectangular make-string make-vector map max member memq memv
+ min modulo negative? newline not null-environment null?
+ number->string number? numerator odd? open-input-file
+ open-output-file or output-port? pair? peek-char port? positive?
+ procedure? quasiquote quote quotient rational? rationalize read
+ read-char real-part real? remainder reverse round
+ scheme-report-environment set! set-car! set-cdr! setcar sin sqrt
+ string string->list string->number string->symbol string-append
+ string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>?
+ string-copy string-fill! string-length string-ref string-set!
+ string<=? string<? string=? string>=? string>? string? substring
+ symbol->string symbol? syntax-rules tan transcript-off transcript-on
+ truncate values vector vector->list vector-fill! vector-length
+ vector-ref vector-set! vector? with-input-from-file with-output-to-file
write write-char zero?)))
- (define geiser-r7rs-small-symbols
+ (define geiser-r7rs-small-symbols
(make-parameter
'(* + - ... / < <= = => > >= abs and append apply assoc assq
assv begin binary-port? boolean=? boolean? bytevector
@@ -154,7 +161,7 @@
vector->list vector-append vector-copy! vector-for-each vector-map
vector-set! when write-bytevector write-string zero?)))
- (define geiser-chicken-builtin-symbols
+ (define geiser-chicken-builtin-symbols
(make-parameter
'(and-let* assume compiler-typecase cond-expand condition-case cut cute declare define-constant
define-inline define-interface define-record define-record-type define-specialization
@@ -177,7 +184,7 @@
(define (write-to-log form) #f)
(define debug-log (make-parameter #f))
-
+
(if use-debug-log
(begin
(define (write-to-log form)
@@ -211,7 +218,7 @@
(define (with-all-output-to-string thunk)
(with-output-to-string
(lambda ()
- (with-error-output-to-port
+ (with-error-output-to-port
(current-output-port)
thunk))))
@@ -238,17 +245,17 @@
(original-module (current-module)))
(set! output
- (handle-exceptions exn
- (with-all-output-to-string
+ (handle-exceptions exn
+ (with-all-output-to-string
(lambda () (write-exception exn)))
(with-all-output-to-string
- (lambda ()
+ (lambda ()
(switch-module module)
(call-with-values thunk (lambda v (set! result v)))))))
(switch-module original-module)
- (set! result (if (list? result)
+ (set! result (if (list? result)
(map (lambda (v) (with-output-to-string (lambda () (write v)))) result)
(list (with-output-to-string (lambda () (write result))))))
@@ -264,7 +271,7 @@
;; This macro aids in the creation of toplevel definitions for the interpreter which are also available to code
;; toplevel passes parameters via the current-input-port, and so in order to make the definition behave nicely
- ;; in both usage contexts I defined a (get-arg) function which iteratively pulls arguments either from the
+ ;; in both usage contexts I defined a (get-arg) function which iteratively pulls arguments either from the
;; input port or from the variable arguments, depending on context.
(define-syntax define-toplevel-for-geiser
(lambda (f r c)
@@ -296,7 +303,7 @@
(if (any (cut eq? <> sym) (geiser-chicken-builtin-symbols))
'(chicken)
'())))
-
+
;; Locates any paths at which a particular symbol might be located
(define (find-library-paths sym types)
;; Removes the given sym from the node path
@@ -317,13 +324,13 @@
(find-standards-with-symbol sym))
(map
(lambda (node)
- (remove-self sym (node-path node)))
- (filter
- (lambda (n)
+ (remove-self sym (node-path node)))
+ (filter
+ (lambda (n)
(let ((type (node-type n)))
(any (cut eq? type <>) types)))
(match-nodes sym)))))
-
+
;; Builds a signature list from an identifier
(define (find-signatures toplevel-module sym)
(define str (symbol->string sym))
@@ -332,7 +339,7 @@
(if (null? module-sym)
(find-standards-with-symbol sym)
(cons module-sym (find-standards-with-symbol sym))))
-
+
(define (fmt node)
(let* ((entry-str (car node))
(module (cadr node))
@@ -410,13 +417,13 @@
;; Builds the documentation from Chicken Doc for a specific ymbol
(define (make-doc symbol #!optional (filter-for-type #f))
- (with-output-to-string
- (lambda ()
+ (with-output-to-string
+ (lambda ()
(map (lambda (node)
(display (string-append "= Node: " (->string (node-id node)) " " " =\n"))
(describe node)
- (display "\n\n"))
- (filter
+ (display "\n\n"))
+ (filter
(lambda (n)
(or (not filter-for-type)
(eq? (node-type n) filter-for-type)))
@@ -476,7 +483,7 @@
;; Load a file
- (define-toplevel-for-geiser geiser-load-file
+ (define-toplevel-for-geiser geiser-load-file
(let* ((file (get-arg))
(file (if (symbol? file) (symbol->string file) file))
(found-file (geiser-find-file #f file)))
@@ -486,7 +493,7 @@
(load found-file))))))
;; The no-values identity
-
+
(define-toplevel-for-geiser geiser-no-values
(values))
@@ -509,14 +516,14 @@
(current-input-port in)
(current-output-port out)
(current-error-port out)
-
+
(repl)))
(thread-start! (make-thread remote-repl))
(write-to-log `(geiser-start-server . ,rest))
(write-to-log `(port ,port))
-
+
(write `(port ,port))
(newline)))
@@ -540,7 +547,7 @@
(filter (lambda (v) (string-search match (symbol->string v)))
(list-modules))))
- (define (geiser-autodoc toplevel-module ids . rest)
+ (define (geiser-autodoc toplevel-module ids . rest)
(define (generate-details sym)
(find-signatures toplevel-module sym))
@@ -549,18 +556,18 @@
(map generate-details ids))
'()))
- (define (geiser-object-signature toplevel-module name object . rest)
+ (define (geiser-object-signature toplevel-module name object . rest)
(let* ((sig (geiser-autodoc toplevel-module `(,name))))
(if (null? sig) '() (car sig))))
;; TODO: Divine some way to support this functionality
- (define (geiser-symbol-location toplevel-module symbol . rest)
+ (define (geiser-symbol-location toplevel-module symbol . rest)
'(("file") ("line")))
(define (geiser-symbol-documentation toplevel-module symbol . rest)
(let* ((sig (find-signatures toplevel-module symbol)))
- `(("signature" ,@(car sig))
+ `(("signature" ,@(car sig))
("docstring" . ,(make-doc symbol)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -579,11 +586,11 @@
(else (try-find file (cdr paths)))))
(try-find file paths)))
- (define (geiser-add-to-load-path toplevel-module directory . rest)
- (let* ((directory (if (symbol? directory)
+ (define (geiser-add-to-load-path toplevel-module directory . rest)
+ (let* ((directory (if (symbol? directory)
(symbol->string directory)
directory))
- (directory (if (not (equal? #\/ (string-ref directory (- (string-length directory 1)))))
+ (directory (if (not (equal? #\/ (string-ref directory (- (string-length directory 1)))))
(string-append directory "/")
directory)))
(call-with-result #f
@@ -591,7 +598,7 @@
(when (directory-exists? directory)
(geiser-load-paths (cons directory (geiser-load-paths))))))))
- (define (geiser-compile-file toplevel-module file . rest)
+ (define (geiser-compile-file toplevel-module file . rest)
(let* ((file (if (symbol? file) (symbol->string file) file))
(found-file (geiser-find-file toplevel-module file)))
(call-with-result #f
@@ -601,7 +608,7 @@
;; TODO: Support compiling regions
- (define (geiser-compile toplevel-module form module . rest)
+ (define (geiser-compile toplevel-module form module . rest)
(error "Chicken does not support compiling regions"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -610,7 +617,7 @@
;; Should return:
;; '(("modules" . sub-modules) ("procs" . procedures) ("syntax" . macros) ("vars" . variables))
- (define (geiser-module-exports toplevel-module module-name . rest)
+ (define (geiser-module-exports toplevel-module module-name . rest)
(let* ((nodes (match-nodes module-name)))
(if (null? nodes)
'()
@@ -640,13 +647,13 @@
;; Returns the path for the file in which an egg or module was defined
- (define (geiser-module-path toplevel-module module-name . rest)
+ (define (geiser-module-path toplevel-module module-name . rest)
#f)
;; Returns:
;; `(("file" . ,(module-path name)) ("line"))
- (define (geiser-module-location toplevel-module name . rest)
+ (define (geiser-module-location toplevel-module name . rest)
#f)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -658,7 +665,7 @@
(lambda ()
(pretty-print (expand form)))))
-;; End module
+;; End module
)
(import geiser)