I started from tabs that are not on the beginning of lines, and in
several places I did further cleanings.
If you're worried about knowing who wrote some code, for example, if you
get to this commit in "git blame", then note that you can use the "-w"
flag in many git commands to ignore whitespaces. For example, to see
per-line authors, use "git blame -w <file>". Another example: to see
the (*much* smaller) non-whitespace changes in this (or any other)
commit, use "git log -p -w -1 <sha1>".
like textual-read-eval-print-loop
There is still a difference, however, because drracket's REPL has a
notion of multiple expressions that are submitted simultaneously that
textual-read-eval-print-loop doesn't. For example, if you type this at
the prompt:
(car) (+ 1 2)
then textual-read-eval-print-loop will print out the error and then 3,
but drracket will print only the error (ditto if (car) were replaced
by a continuation abort).
This difference is, IMO, a good thing, since it lets you use a single
interaction to do multiple things, but stops as soon as there is an
error. (It is also how drracket has behaved for a long time.)
closes PR 12790
pixel of space in between lines in DrRacket.
This change is based on Matthew's experience having a look
at the font setup on the three platforms.
He writes:
> * Mac OS X: the convention seems to be to add space between lines.
> TextEdit, for example, looks like DrRacket: the maze has spaces.
>
> (I can't find a font that makes the maze look right, actually, even
> if I adjust the line spacing.)
>
> * Windows: the convention seems to be that space is built into the
> font. DrRacket (and SirMail) draw lines more sparsely than Notepad.
>
> Perhaps consistent with the differing conventions, the height of
> "Courier New" at 11-pixel size is 14 on Windows, 13 on Mac OS X.
>
> * Unix: the convention seems to be to add space. DrRacket looks like
> the default Terminal and Text Editor programs on Ubuntu.
>
> The maze nevertheless looks right everywhere, because the glyphs
> extend an extra pixel above the declared bounding box!
esc;c:x send-toplevel-form-to-repl
m:c:x send-toplevel-form-to-repl
c:c;c:e send-toplevel-form-to-repl
c:c;c:r send-selection-to-repl
c:c;m:e send-toplevel-form-to-repl-and-go
c:c;m:r send-selection-to-repl-and-go
c:c;c:z move-to-interactions
Took the inspiration for the list from the keybindings
available in Scheme mode in Emacs.
Closes PR 12211 (and probably others)
being edited in DrRacket (via places)
Added an API to let tools have access to that
information (and compute more stuff)
Used that to make an online version of Check Syntax
which led to a separately callable Check Syntax API.
then, use that to change how it works for the scheme mode (and also another variation for the REPL to
cope with the prompt)
I spent a while trying to make this work at the keymap% level (ie putting different keybindings for "home"
and "c:a" into different keymaps) but this just turned out to be far too confusing and fragile, so went
with this alternative (one keybinding, but that delegates to an overridable method)
closes PR 11446
queue-callback / execute callback dance; also, change the behavior
a little bit so that it works a little bit more like the rest of the
DrRacket languages; in particular, the initialization of the REPL
now only happens when a window is first opened or a new tab is first
created, but not at other times (ie not when the language changes;
when the language changes, we just keep the REPL state the same and
show a warning like before)
This change also required a change to the way the repl is initialized
and a slight change to the behavior of the first-opened method. Specifically,
it is now called in a slightly better context so that errors that
happen look like errors in the user's program. The only other use of
the first-opened method in the tree was to initialize the teachpacks
in the teaching languages and this new behavior is also an improvement
there.
The bug was that the planet log message registration was happening
on drracket's thread instead of on the user's thread, so it was
using the wrong keys in the ephemerons.
language dialog, not the #lang htdp/* variants), teachpacks are put into the
initial REPL (instead of just having the language primitives).
closes PR 11160