Commit Graph

21635 Commits

Author SHA1 Message Date
Eli Barzilay
c7bf34d387 Improve macro stepper output, and some more ,stx outputs.
(cherry picked from commit 8109299ec8)
2011-07-19 16:57:07 -04:00
Eli Barzilay
36a0fea0cc 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.
(cherry picked from commit f5e53de4d9)
2011-07-19 16:57:05 -04:00
Guillaume Marceau
d1b79946f9 Fixes the (cons an image empty) error message
(cherry picked from commit 2ae0376476)
2011-07-19 16:57:01 -04:00
Matthew Flatt
18b8751ee2 win32: fix is-maximized' in frame%'
Merge to 5.1.2
(cherry picked from commit 255549c8c8)
2011-07-19 11:39:37 -04:00
Matthew Flatt
0083418b53 cocoa: fix image paste
Closes PR 12028

 Merge to 5.1.2
(cherry picked from commit c8b3763359)
2011-07-19 11:39:05 -04:00
Carl Eastlund
a03b11befc Fixed a macro stepper bug: can't use zero? on syntax span, as it can be #f.
Please include in the upcoming release.
(cherry picked from commit 302cbb5275)
2011-07-19 11:36:32 -04:00
Eli Barzilay
1f7e9658a3 Fix reading a 'line argument: always succeeds and returns the line as-is.
(cherry picked from commit 09c8880ea0)
2011-07-19 11:36:24 -04:00
Eli Barzilay
4c8a6aefe7 Add $F for ,sh commands.
(cherry picked from commit 261288c394)
2011-07-19 11:36:21 -04:00
Eli Barzilay
e8d3223ce5 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".)
(cherry picked from commit 3c1e624916)
2011-07-19 11:36:17 -04:00
Eli Barzilay
3223a656a6 Hook XREPL into a few places where readline' and enter!' are mentioned.
(cherry picked from commit 5fb8390609)
2011-07-19 11:36:14 -04:00
Eli Barzilay
f8974781fe XREPL documentation.
(cherry picked from commit d7c14cbd3f)
2011-07-19 11:36:10 -04:00
Eli Barzilay
8d0db4cd35 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).
(cherry picked from commit c57ab7b4fc)
2011-07-19 11:36:07 -04:00
Eli Barzilay
e0a96d3e7e Typo in the `errortrace' language description.
(cherry picked from commit 50b74c453f)
2011-07-19 11:36:02 -04:00
Eli Barzilay
c1a82bf23e Use (banner) instead of a fixed "Welcome to Racket" in the More tutorial
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)
2011-07-19 11:35:59 -04:00
Eli Barzilay
71ea3183ba Rename prompt-shown' -> zero-column!', and use it only in the
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.)
2011-07-19 11:34:29 -04:00
Robby Findler
d5045184c9 fix missing argument to format
please merge to release branch
(cherry picked from commit 2b99c86321)
2011-07-19 11:28:53 -04:00
Matthew Flatt
4b13d54396 fix "block cache" layer to handle allocation failure
(cherry picked from commit 5efe7001d6)
2011-07-19 11:28:51 -04:00
Guillaume Marceau
d8c7bd138f Undoes the 'produces -> return' part of commit c31d352f, keeping the 'changes -> mutates' change and the assorted bug fixes it contained.
(cherry picked from commit adf965e92a)
2011-07-19 11:28:47 -04:00
Matthew Flatt
df42ae7cb7 fix `get-module-path' and associated exception
Closes PR 12029
(cherry picked from commit d8d762517f)
2011-07-19 11:28:45 -04:00
Matthew Flatt
34530173f9 fix `enter!' to set module source name
Merge to 5.1.2
(cherry picked from commit 67936b7a66)
2011-07-19 11:28:41 -04:00
Eli Barzilay
f8c4f23b5c Manually constructed patch from Robby: fixes the executable problem. 2011-07-19 11:27:51 -04:00
Matthew Flatt
70fdc4ef90 fix source name of built-in modules
Closes PR 12051

 Merge to 5.1.2
(cherry picked from commit 92671ab3ea)
2011-07-19 11:23:34 -04:00
Matthew Flatt
253ba1376b belated test case for cm ".dep"-read fix
Merge to 5.1.2
(cherry picked from commit 67272f114b)
2011-07-19 11:23:25 -04:00
Matthew Flatt
4af675677d fix printing of namespace with places enabled
This commit goes with 62acb298bd.
(cherry picked from commit 701c9666d6)
2011-07-19 11:23:22 -04:00
Matthew Flatt
5a5430f91e revert unnecessary refactoring
--- intended to avoid creating a dependency that already exists

 Merge 5.1.2
(cherry picked from commit ab0e78122c)
2011-07-19 11:23:19 -04:00
Matthew Flatt
bc46623eca restore deinprogramm reader module suffix
(cherry picked from commit fc914dfac8)
2011-07-19 11:23:16 -04:00
Matthew Flatt
ed4185cae9 don't compile test file with image constant
(cherry picked from commit bd10ccc1b7)
2011-07-19 11:23:05 -04:00
Matthew Flatt
9e3ee9e2f8 fix cm to configure reader when reading .dep files
Merge to 5.1.2
(cherry picked from commit 7af5d490ad)
2011-07-19 11:22:53 -04:00
Matthew Flatt
34b3045b9b fix SGC
Merge to 5.1.2
(cherry picked from commit 3f0914080b)
2011-07-19 11:22:47 -04:00
Matthew Flatt
af3db4d9fe change GDK_POINTER_MOTION_HINT_MASK back to GDK_POINTER_MOTION_MASK
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)
2011-07-19 11:22:42 -04:00
Matthew Flatt
b560fc83aa fix taint behavior of some syntax operations
`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)
2011-07-19 11:13:20 -04:00
Matthew Flatt
f4bb576511 limit build parallelism to 4 on a 32-bit machine
Merge to 5.1.2
(cherry picked from commit e57b7b9e54)
2011-07-19 11:13:00 -04:00
Robby Findler
4e5ac3c261 typo
(cherry picked from commit 9e0a866969)
2011-07-19 11:12:54 -04:00
Matthew Flatt
9f5ad021f1 fix errortrace
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)
2011-07-19 11:12:48 -04:00
Ryan Culpepper
a0ccf20b30 macro-stepper: disable taint display until correct
Merge to release branch
(cherry picked from commit 91a2e283a6)
2011-07-19 11:12:42 -04:00
Matthias Felleisen
fecc46f97d adjusted expected error messages to accommodate Stephen's change
(cherry picked from commit 6c51155fec)
2011-07-19 11:12:24 -04:00
Matthias Felleisen
0372e02294 documented error reporting functions
(Cherry picked from 9193203, and slightly edited for conflicts due to
code shuffling.)
2011-07-19 11:11:01 -04:00
Matthias Felleisen
14cd4ae26c fixed bug in exception handling for drawing; Closes PR 12044
(cherry picked from commit 562252f589)
2011-07-18 12:43:19 -04:00
Guillaume Marceau
29e8c44ba9 Roll back the "expr -> expression" change in the grammar documentation of the
teaching languages. The extra width was breaking some browsers.
(cherry picked from commit 7134d67921)
2011-07-18 12:43:16 -04:00
Guillaume Marceau
8c54e212da Standartize the vocabulary to "the function returns" and "set! mutates"
(cherry picked from commit c31d352f2b)
2011-07-18 12:43:12 -04:00
Matthew Flatt
f790a77e40 places: fix printing of symbol resolved module paths
(cherry picked from commit 62acb298bd)
2011-07-18 12:43:09 -04:00
Matthew Flatt
e1dbfe67e3 remove obsolete reference to '#%mred-kernel
(cherry picked from commit 1c4722eaee)
2011-07-18 12:43:06 -04:00
Matthew Flatt
c4ca803955 fix typo; eliminate "this" as a noun; otherminor improvements
(cherry picked from commit 5e5172baab)
2011-07-18 12:43:03 -04:00
Vincent St-Amour
be3aa544ad Fix unbalanced curly brackets.
(cherry picked from commit 937d0ad722)
2011-07-18 12:42:49 -04:00
Asumu Takikawa
2c70c98228 Fix a few framework contracts to match code
(cherry picked from commit 6c3284a828)
2011-07-18 12:42:46 -04:00
Eli Barzilay
225f563bda 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).
(cherry picked from commit db7f2b4542)
2011-07-18 12:42:42 -04:00
Eli Barzilay
0b0de351fd New `xrepl' collection.
(cherry picked from commit c544ebfe6c)
2011-07-14 17:29:53 -04:00
Stephen Bloch
14ed19da09 Corrected signature of scene+line to match examples and actual behavior
(sixth argument can be a pen or color, not just a color).
(cherry picked from commit d510f6aecc)
2011-07-14 17:29:43 -04:00
Stephen Bloch
3a2e4969e9 Corrected an error message that said it wanted a real, but actually
expected an integer.
(cherry picked from commit 83fd1e968d)
2011-07-14 17:29:31 -04:00
Eli Barzilay
a606c3a988 Shift typo.
(cherry picked from commit 318c4fedfc)
2011-07-14 17:29:27 -04:00