Commit Graph

54 Commits

Author SHA1 Message Date
Eli Barzilay
672910f27b Lots of bad TAB eliminations.
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>".
2012-11-07 11:22:20 -05:00
Robby Findler
81dc3bae37 audit the calls to invalidate-bitmap-cache in the framework and in
drracket and try to make them happen less often (or, if there will be
multiple ones, try to guarantee that there is an edit sequence)
2012-11-04 19:02:55 -06:00
Robby Findler
7e8ac872fe add logging to mred's event callback mechanism to record
how long event processing takes
2012-10-26 21:49:44 -05:00
Robby Findler
a6d74c8e3b avoid the default handler for call-with-continuation-prompt in
favor of one that behaves much like it, but never escapes

closes PR 13121
2012-09-20 18:46:40 -05:00
Eli Barzilay
18883681a2 Convert all uses of (integer-in 0 255) to `byte?'. 2012-07-22 13:00:05 -04:00
Robby Findler
5b96803273 fix a bug introduced by commit 05b88930c0
the symptom of the bug is that the red
error highlighting never worked

Please merge to the release branch
2012-07-21 07:23:47 -05:00
Robby Findler
05b88930c0 improve how an after-insert callback behaves (specifically,
avoid redundant work when there are multiple inserts during
an edit sequence)

closes PR 12897
2012-07-13 10:50:13 -05:00
Robby Findler
77811e0e95 Adjust how the drracket repl iterates over expressions to make it more
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
2012-05-30 22:31:55 -05:00
Eli Barzilay
17090fca4f A bunch of fprintf' -> eprintf' conversions (and a few related things). 2012-05-06 12:06:00 -04:00
Robby Findler
0d6b825377 add a preference to control whether or not there is an extra
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!
2012-03-24 20:20:05 -05:00
Robby Findler
950d165133 fix the not-a-language message so that the styles in the REPL are right 2012-01-06 20:59:34 -06:00
Robby Findler
7fb3d5c395 improve the red highlighting in drracket so that it picks
the first thing in the stack that's in the definitions window
(instead of just the first thing in the stack period)
2012-01-04 10:59:42 -06:00
Robby Findler
376ad1f52c remove 'stupid-internal-definition' and Rackety 2011-12-27 08:53:32 -06:00
Robby Findler
cbab512dd1 adjust the way 'jump to next/prev error source loc' menu items work
so that they also highlight the error location in pink when jumping there
2011-12-07 16:18:17 -06:00
Robby Findler
458e2c2282 some long overdue Rackety: renaming the 'scheme:' exports of the framework to 'racket:' 2011-11-30 06:45:50 -06:00
Robby Findler
e935b1fa8e change the framework & drracket so that they still use the colorer
methods (paren matching, mostly) when the colorer is frozen
(but continue to avoid using them when the colrer is stopped)

closes PR 12374
2011-11-29 13:46:23 -06:00
Robby Findler
bfa6b1d953 Fixed some bugs in the double-stacktrace window; adjusted the repl to
be able to insert more with-stack-checkpoint calls in useful places;
adjust test suites to match the change in when the stacktrace icon
shows up
2011-11-07 07:42:14 -06:00
Robby Findler
fa98274aed add a checkbox to the 'evaluation terminated' dialog to avoid seeing that dialog
closes PR 6575

don't include in 5.2
2011-10-10 14:18:01 -05:00
Robby Findler
2339046554 shrink some long lines 2011-10-07 11:48:39 -05:00
Robby Findler
abda257295 moved the 'send to repl' keystrokes to the manual (and added a test
suite to make sure the example code in the manual doesn't get stale)
2011-09-23 16:37:18 -05:00
Robby Findler
b1a360be9d Add the following keybindings in a (hopefully) transparent REPL-friendly way:
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)
2011-09-22 10:51:48 -05:00
Robby Findler
7e27cc5331 adjust the order in which the keymaps are added to the interactions
window so that repl-specific bindings override the general purpose
drracket editor bindings
2011-09-20 17:15:03 -05:00
Robby Findler
2fea831663 fix bug introduced in recent commit caught by drdr 2011-09-20 06:57:02 -05:00
Robby Findler
252db20c85 add menus and keybindings for jumping around to the errors in the defs
window

also a little line-length shrinking
2011-09-19 22:47:47 -05:00
Robby Findler
a67f509f90 add frame:focus-table-mixin & related things to be able to make drracket
test suites that don't depend on the OS giving any focus messages
2011-09-05 08:30:49 -05:00
Robby Findler
8bcbaa11d6 adjust drracket's userspace initialization so that it does not set the
user's pretty-print-columns globally; instead it just records the value
and uses parameterize to install it when printing results
2011-08-29 08:42:42 -05:00
Robby Findler
41e22a6e3f added the ability to tell drracket to run a program and then run something after that
used that ability to make the scribble buttons work better
2011-08-24 11:25:26 -05:00
Robby Findler
b972a0940d Added online expansion and compilation of files
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.
2011-08-02 16:28:16 -05:00
Robby Findler
1c2f4ab05c add an exit handler setting for the drracket:eval:* functions
(and then adjust the drracket-repl exit handler to take
   precedence over that one)
 closes PR 12071
2011-07-21 13:34:54 -05:00
Guillaume Marceau
f858b8bb5c Htdp no longer throws exceptions that have no source information 2011-07-06 00:19:24 -04:00
Guillaume Marceau
79589b9b9f The htdp test suite now checks that the correct error messages are thrown. 2011-07-06 00:19:22 -04:00
Robby Findler
835762903c if we're highlighting something in the defs window, make sure the window is shown
closes PR 11977
2011-06-17 12:43:09 +08:00
Robby Findler
41497cec6a avoid printing stacktrace information when the exception is a exn:fail:user?.
closes PR 11874
2011-04-24 07:45:07 -05:00
Robby Findler
56ab3eecb6 make the front-end deadlock avoidance (aka pospone io) wrapper handle specials
closes PR 11831
2011-03-31 15:21:45 -05:00
Robby Findler
e3c26a2aa4 improved the setup for the front-end method so that
printing to stdout and stderr is safe and to better document
the issues
2011-02-15 18:10:03 -06:00
Robby Findler
d2cb96bcb3 setup hooks so that the behavior of the home / c:a keybinings delegates to a method to find where to go
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
2011-01-09 16:22:28 -06:00
Robby Findler
b0309ae99e changes the way the drracket frame is initialized so that it finishes on a single GUI event callback
related to PR 11590
2011-01-04 06:18:44 -06:00
Robby Findler
7eb3e8c28a change drracket and framework so they don't rebind printf anymore
(instead binding oprintf to print to the original output port of drracket)
2011-01-02 10:03:24 -06:00
Robby Findler
fb25dc9a42 adjusted drracket test suites so that it is (more) careful to keep all manipulation of GUI objects (text% objects seem to have been the important one) on the drracket eventspace main thread in an effort to make the test suites more stable. 2010-12-29 20:31:40 -06:00
Robby Findler
bf53fd5c38 adjust the auto-text behavior of DrRacket so that it doesn't require the
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.
2010-12-20 08:43:34 -06:00
Casey Klein
5bb45d787f Caps REPL history using string length rather than entry count 2010-12-02 15:54:49 -06:00
Casey Klein
fad4771167 Fixes a bug in the cap on REPL history 2010-12-02 15:54:48 -06:00
Robby Findler
c123a8cc5d fixed a bug that caused a leak that held onto drracket frames.
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.
2010-11-28 16:06:09 -06:00
Robby Findler
616647cb17 drr: remove bad keybindings for next-tab and prev-tag 2010-11-14 06:48:57 -06:00
Eli Barzilay
d7b9857f7b Remove unused definition. 2010-10-04 13:18:06 -04:00
Robby Findler
7dbb287601 make bugs like that in PR 11241 easier to diagnose / see by turning
the hang into a dialog.
2010-09-23 06:25:21 -05:00
Robby Findler
c52bc4c524 removed unused method 2010-09-05 07:41:00 -05:00
Robby Findler
5e04a5c6d9 When opening a new window where the language is one of the htdp languages (via the
language dialog, not the #lang htdp/* variants), teachpacks are put into the
initial REPL (instead of just having the language primitives).

closes PR 11160
2010-09-04 19:37:02 -05:00
Robby Findler
83cde5c8fb got rid of some uses of collection-path 2010-07-25 15:15:57 -05:00
Robby Findler
e8573d9478 change the way the prompt testing works to only supply a port, instead of giving over the actual text object 2010-06-20 20:55:04 -05:00