Not too much, but already tests large parts of sensitive code. Caught a
bug where ,top would use (enter! #f) but enter grabbed the wrong
namespace since it was instantiated in the wrong namespace.
(cherry picked from commit f5e53de4d9)
For the record, a way to do this permanently is to add something like
this to your ~/.racketrc:
(eval '(begin
(saved-values-char #\~)
(defcommand eli "stuff" "eli says" ["Make eli say stuff"]
(printf "Eli says: ~a\n" (getarg 'line)))
(defcommand er #f "alias for errortrace" ["Runs errortrace"]
(run-command 'errortrace)))
(module->namespace 'xrepl/xrepl))
But this is too stupid even for a section that has "Hacking" in its title.
There should definitely be an organized way to do this. This will
require several things:
* A decent API for doing these things for user code. (So the above
`eval' turns to a `require' for your file which uses this API.) This
goes beyond just documenting what's in there -- there are issues to
resolve like some argument reading protocol (separating the
declaration of argument types from the command implementation code),
so a new command can call another with arguments that it reads.
* There should also be some ,set command for customization
options (reading and changing) and code to use the preference file for
doing that. I almost started to do this, but currently there are only
three values that this could apply to (`saved-values-char', `-number',
and `wrap-column' (which might be better to dump and use
`pretty-print-columns' instead)).
* Also, it might be nice to have some command to do the same for simple
aliases. (But this might get into shady parsing issues if it's more
than just "I want `foo' to be an alias for an existing `bar' command".)
(cherry picked from commit 3c1e624916)
* Rename `make-command-{reader,evaluator}' -> `make-xrepl-{reader,evaluator}'
* Move the commented-out ,meta block to a better place
* Protect the prompt computation against errors, to avoid infinite
exception output if an exception is raised.
* Add ",switch ?" to query namespaces, and ",switch - <name>" to remove
one. Forbid resetting the default initial `*' namespace.
* Clarify that multiple arguments can be sent to ,stx and fix it to
display the current syntax when there are no arguments.
* Various minor typos and improvements.
* Restore the use-last-arguments-by-default functionality of ,rr
* Re-do argument reading to make it easier to have a default
argument (as in ,enter and ,edit).
(cherry picked from commit c57ab7b4fc)
and in the guide.
Also, add a tag to the readline "License Issues" to be able to link to
it from the xrepl docs.
(cherry picked from commit 45394bb7b6)
non-readline reader. Use line reading for ,install!.
(Cherry-picked from 3f8bb7a, and edited conflucts because
`port-set-next-location!' is not added to the release.)
because HINT doesn't works as expected, and the problem it
seemed to solve at one time (slow resize in DrRacket) seems
to have been fixed some other way. GDK_MOUSE_MOTION_MASK
isn't needed, since GDK_POINTER_MOTION_MASK covers it.
Merge to 5.1.2
(cherry picked from commit 5edc0c70af)
`syntax-local-get-shadower' and
`syntax-make-delta-introducer' both taint their
results when a given syntax object is tainted
(cherry picked from commit 4307bcace5)
The `eq?'ness of syntax objects used to reconstruct the result
was broken by disarming. The solution is to reconstruct based
on the disarmed syntax object instead of the original.
Merge to 5.1.2.
(cherry picked from commit 0f61d62ea1)
requiring itself into the entered namespace.
This makes it useful in some cases where this require leads to a
dependency cycle, eg (enter! racket/list). It's obviously not useful
for use as-is, since you will not have a bound `enter!' to get out of
the namespace (and possibly no `require' to get it) -- but it is useful
for meta-tools like xrepl. This is why the flag is verbose. `xrepl'
now uses this flag.
Also, the check for valid keywords for the form is now done at runtime
rather than in the macro. This doesn't matter in this case, since the
form is intended for interactive use anyway.
Also, separate the two parts of `enter-load/use-compiled' (it was
defined curried, but didn't use it).
(cherry picked from commit db7f2b4542)