Commit Graph

25 Commits

Author SHA1 Message Date
Eli Barzilay
4ec565ae97 Add the missing documentation for ,check-requires. 2011-08-29 17:41:35 -04:00
Eli Barzilay
89096b8838 Added `check-requires'. 2011-08-29 15:13:00 -04:00
Matthew Flatt
2692d119be fix cross-reference 2011-08-28 11:08:33 -06:00
Eli Barzilay
6e50ecad99 Add $1', $2', ..., `$5' as last-value references. 2011-08-26 09:42:56 -04:00
Eli Barzilay
cda4479d1e Hold the saved values weakly. 2011-08-26 09:10:46 -04:00
Eli Barzilay
6203f53ef6 Syntax-based implementation for saved values, finally working. 2011-08-26 05:26:46 -04:00
Matthew Flatt
f082919f0b doc style adjustments; reorg cmdline+editors docs in Guide 2011-08-24 09:07:12 -06:00
Eli Barzilay
9091fddc52 Use (here-namespace) for autoloads, (not `hidden-namespace' which is more of a user workspace thing). 2011-08-23 12:08:37 -04:00
Eli Barzilay
01a591392e Some more ;-ized printouts. 2011-08-23 12:08:37 -04:00
Eli Barzilay
db5c6e02d7 Typo fixes, thanks to David Van Horn. 2011-08-23 12:08:37 -04:00
Eli Barzilay
2bc2050c08 Fix when showing the description of a module.
Set `current-load-relative-directory' to the path of the module file so
paths that it resolves in the description (in `describe-modeul') are not
bogus.
2011-08-22 07:49:49 -04:00
Eli Barzilay
1caa28df28 Fix `unstable/time' & xrepl use. 2011-08-02 16:56:02 -04:00
Eli Barzilay
e52e7defae Much improved `wrapped-output'. 2011-08-02 16:56:02 -04:00
Eli Barzilay
7585edbcb6 xrepl improvments:
* a single function to set up all environment parameters.

* improve `getarg's treatment of default thunk

* Add an error display handler that doesn't show the context and instead
  add a ,bt command to show it.
2011-07-29 07:29:29 -04:00
Eli Barzilay
8109299ec8 Improve macro stepper output, and some more ,stx outputs. 2011-07-19 16:39:15 -04:00
Eli Barzilay
f5e53de4d9 XREPL tests.
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.
2011-07-19 16:39:15 -04:00
Eli Barzilay
09c8880ea0 Fix reading a 'line argument: always succeeds and returns the line as-is. 2011-07-18 15:39:18 -04:00
Eli Barzilay
261288c394 Add $F for ,sh commands. 2011-07-18 15:34:31 -04:00
Eli Barzilay
3c1e624916 Add an example for extending xrepl, the very stupid way.
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".)
2011-07-18 15:23:09 -04:00
Eli Barzilay
d7c14cbd3f XREPL documentation. 2011-07-18 14:25:10 -04:00
Eli Barzilay
c57ab7b4fc Lots of improvements:
* 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).
2011-07-18 14:25:10 -04:00
Eli Barzilay
3f8bb7a453 Rename prompt-shown' -> zero-column!', and use it only in the
non-readline reader.  Use line reading for ,install!.
2011-07-18 14:25:10 -04:00
Eli Barzilay
95f6eb4f3e Use the new `set-port-next-location!' instead of the previous hack.
(But something might still be off -- I thought that its use in readline
would render the whole thing redundant.)
2011-07-14 17:21:46 -04:00
Eli Barzilay
db7f2b4542 Add a new #:dont-re-require-enter' flag for enter!', to avoid
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).
2011-07-14 17:21:46 -04:00
Eli Barzilay
c544ebfe6c New `xrepl' collection. 2011-07-14 17:21:46 -04:00