Commit Graph

697 Commits

Author SHA1 Message Date
Robby Findler
35e818ae50 the autosave file might be deleted by the user after it is created
the first time but before the file is actually saved. guard against that.

closes PR 12698
2012-04-13 10:04:25 -05:00
Robby Findler
a475c078e2 add splicing-syntax-parameterize to the default indentation prefs 2012-04-05 17:34:45 -05:00
Robby Findler
a1446a037b be a bit more systematic with tabbing and magic square-bracket-ing for 'for's
also, add in for/sum and for/product
2012-03-28 07:21:09 -05:00
Robby Findler
617df05ef7 added a test suite for DrRacket that checks to make sure the Dear Dr
starts up on all of the days that have easter eggs (well, except 7/2,
since that one is hard to interpose on and hasn't changed in a long
time)
2012-03-26 15:43:56 -05:00
Robby Findler
b640b6b41c fix splash screen error handling code 2012-03-26 15:43:55 -05: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
Matthew Flatt
e01ebf6095 try module+' in place of slice' 2012-03-13 14:31:40 -06:00
Robby Findler
a7cb8fdc84 small improvements to the memory usage for files opened in DrRacket.
Before this commit, opening collects/drracket/private/unit.rkt required
about 17.5 megabytes of memory and after this commit, it is down to
about 15 megabytes.

The precise measurement I did was to create a frame and a scheme:text%
object in it, record the result of current-memory-use, open the file,
and record current-memory-use again.

For comparison, using a text:standard-style-list% object instead of
the scheme:text% requires only about 4.1 megabytes. One difference
being that there are about 3x more snips (10,204 vs 33,901 (after the
commit)), since we have one snip for each region that has a different
color in the scheme:text version, and the text:standard-style-list has
no colors and thus about two per line (there are 5006 lines in the
file).
2012-03-10 20:18:49 -06:00
Matthew Flatt
54a441c0e3 DrRacket default `module*' indentation 2012-03-09 10:34:57 -07:00
Asumu Takikawa
04f7bdbb02 framework: add missing methods to interface and docs
The set-replace-start and get-replace-search-hit methods were
missing in the text:searchable<%> interface. The latter was
also undocumented.
2012-03-01 13:17:48 -05:00
Eli Barzilay
f7c67b49a4 Big newline at EOF scan. 2012-02-29 00:28:11 -05:00
Robby Findler
eda4d294cc Lost the snipclass with the name (lib "collapsed-snipclass.ss" "framework")
somewhere between 5.1.3 and 5.2.1. Bring it back.

closes PR 12563
2012-02-14 11:26:20 -06:00
Sam Tobin-Hochstadt
e3609cdb32 Refactor and improve fuzzy searching in completion. 2012-01-13 14:39:05 -05:00
Robby Findler
e067a4415a fix call to message box to remove incorrect style flag
merge to the release branch, please
2012-01-11 13:16:46 -06:00
Robby Findler
95ac3c86f7 fixed bug in the way aug:keymap extracts the names
now it should return only the canonical names of the keybindings
(instead of potentially returning both the canonical and
non-canonicalized names)
2012-01-08 07:07:56 -06: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
48772f2e40 when double clicking in a comment, fall back to word-based instead
of sexp-based selection

closes PR 12439
2011-12-12 14:45:27 -06:00
Robby Findler
1d03e5f711 adjust the double clicking in racket mode so that clicks on the
(instead of sexp-based)

closes PR 12421
2011-12-05 21:01:28 -06:00
Robby Findler
082978effe improve the double-click-on-word behavior for scribble (generally when
double clicking inside a string) and when clicking on close
parentheses (specifically, only special case close parens that are
actually parentheses according to the colorer, rather than special
casing all close parens).
2011-11-30 16:55:54 -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
dd4f307a47 use an aug-keymap instead of a keymap for the scheme mode keymap container 2011-11-29 14:27:51 -06:00
Robby Findler
1c2f9cd721 adjust the handling of the scheme mode keymap so that it can go
before the plain text-mode keymap.

Add a doubleleftclick binding to the scheme mode keymap so that
we can have sexp-sensitive double clicking in the drracket editor
2011-11-29 13:46:23 -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
11994bd4f8 fix a bug in the module lexer; it was returning the wrong length for the tokens
it creates when the #lang line isn't well-formed (eg "#lang racke").

closes PR 12399
2011-11-28 21:16:31 -06:00
Robby Findler
d580518e66 adjust the autosave error code to print the stacktrace
related to PR 12400
2011-11-28 15:34:30 -06:00
Robby Findler
d381c7b40b add the ability to pass a bitmap directly for the splash screen 2011-11-28 14:35:44 -06:00
Robby Findler
081dc6c9a1 adjust the completions box so that it doesn't raise the error mentioned in 12396 anymore
closes PR 12396
2011-11-26 18:30:25 -06:00
Robby Findler
e942bb1c3a add another printf for drdr's consumption 2011-11-25 17:54:56 -06:00
Robby Findler
ca457b0052 add some debugging to see if I get more useful info for the module language test intermeittent failure 2011-11-25 15:13:11 -06:00
Robby Findler
6ea6483221 adjust number-snip% so that it subscribes to the file/convertible
protocol for 'png-bytes and 'text
2011-11-20 16:38:17 -06:00
Robby Findler
b726209dc5 fix the interaction between the automatic insertion of matching parens
and the magic fixup of opening parentheses.

This commit moves the automatic insertion of matching parens to the
scheme mode keymap, so it will now take affect in Racket mode editing,
only. Also, Rackety.
2011-11-16 19:36:18 -06:00
Robby Findler
3345415d71 Make the 'Show Replace' menu item be always enabled. Also, make it
set the keyboard focus to the replace editor.

It used to be disabled when the searching bar is hidden. In that case, it now
makes the searching bar visible.
2011-11-16 16:23:11 -06:00
Sam Tobin-Hochstadt
0754e6b702 Make autocompletion fuzzier, similar to the doc search.
For example, autocomplete of `cur-dir' will produce the same list of results as the documentation search, with `current-directory' first, instead of producing no results.
2011-11-13 16:33:17 -05:00
Robby Findler
5128f08810 minor docs fix 2011-11-01 09:51:28 -05:00
Robby Findler
4a3997ac1c use the focus table mixin for the autosave window so that drdr tests work right 2011-10-17 17:32:37 -05:00
Matthew Flatt
f2082e6eeb fix framework doc reference to `set-icon' method
Merge to 5.2
2011-10-11 17:17:58 -06:00
Robby Findler
4d00b13ce0 adjust the autosave gui so that closing the window doesn't cause drracket to
exit (this only happened on non-mac os x platforms)

include in 5.2
2011-10-11 10:44:00 -05:00
Sam Tobin-Hochstadt
1b69d742bd Change basic-top-level-window% to support `set-icon', and use to set icon for splash screen.
Closes 12241

Merge to 5.2
2011-10-09 09:43:32 -06:00
Robby Findler
fcc720f43e adjust uses of after-load-file to use the success? flag 2011-10-08 10:50:27 -05:00
Robby Findler
7aa6153da1 adjust the calls to paragraph-{start,end}-position to specify the default argument 2011-10-07 14:02:27 -05:00
Robby Findler
93c1d1dd36 add a 'find longest line' menu item to the edit menu 2011-10-07 11:48:39 -05:00
Robby Findler
9b3f2427d7 make right-click in the space between the definitions and
interactions window pop up a menu to let you change from
vertical to horizontal orientation
2011-10-04 16:47:10 -05:00
Robby Findler
6fd2e9c1d3 fixed planet docs; closes PR 12178 2011-10-04 12:56:35 -05:00
Robby Findler
3bfce02bd6 fix my stupidity 2011-10-02 18:14:55 -05:00
Robby Findler
c455631eb3 fixed another path/string bug in the autosave recovery dialog 2011-10-02 17:19:27 -05:00
Robby Findler
951de8cc51 add get-default-percentages to panel:dragable and then add a dragable panel
to the debugger
2011-10-02 14:34:28 -05:00
Robby Findler
b71e562284 fix crlf mode initialization 2011-10-01 08:10:25 -05:00
Robby Findler
4a2757f200 Adjust DrRacket so that it saves files with CRLF
line terminators when:

  a) running under windows, and
  b) the file on the disk (when DrRacket first opens it)
     contains all CRLF line endings.

In all other situations, the file is saved with LF terminators.

Before this commit, DrRacket would always use the platform-specific
convention, regardless of the original content of the file.

closes PR 12242
2011-09-30 17:08:07 -05:00
Robby Findler
b95b346a4e adjust various plumbing to get the drracket icon to the startup screen. Only to realize
that the startup screen is a dialog% and thus doesn't have set-icon

related to PR 12241
2011-09-30 17:08:03 -05:00
Eli Barzilay
093236fea4 Improve code generation in the framework collection.
Instead of generating a file for code and one for documentation, do both
via a macro instead.  Most of the code is the same (modulo reformatting
in a more modern style), and instead of printing the result to a file,
it just returns it as the result of a macro.  (Since this is done in a
naive way, the macro is bad -- it is unhygienic since this is basically
what it did before only through a generated file; it should eventually
be improved to avoid these hacks.)
2011-09-30 10:51:28 -04:00
Eli Barzilay
656de69636 Don't create a page-setup menu item if `file-menu:create-print?' returns #f. 2011-09-30 10:45:43 -04:00
Eli Barzilay
01c859072e Rename "standard-menus.rkt" -> "standard-menus.rktl".
Since it's a file that gets included.  This is likely to be temporary,
if I get on with turning the whole thing into a macro.
2011-09-30 10:45:43 -04:00
Robby Findler
3a3ce656c4 add splicing-* to the default indentation preferences setting 2011-09-29 06:55:05 -05:00
Robby Findler
bef4ed1fd4 adjust frame position preferences for the case when a monitor has gone away 2011-09-28 21:04:56 -05:00
Ryan Culpepper
afc9210599 revert some (require racket/pretty) to (require scheme/pretty) 2011-09-28 19:01:27 -06:00
Robby Findler
c8cbe81e51 fix problems with the autosave recovery gui and add a drdr test for it 2011-09-28 17:06:30 -05:00
Robby Findler
abeaebcad0 remove debugging printf 2011-09-28 17:06:29 -05:00
Ryan Culpepper
c7f86d276c removed useless requires 2011-09-27 19:28:44 -06: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
2ec720176a extend and refactor minor stuff in the framework
specifically add an argument to move/copy-to-edit so that it
does copy-only and export a function for trigger a submission
to the input port of a text:ports<%> object programmatically
2011-09-22 10:51:47 -05:00
Robby Findler
048fa1d7b8 get rid of the "open here" functionality
This is a backwards incompatible change; there is a more complex change
that just stubs this stuff out that may be better that we may need
isntead of this commit.
2011-09-21 22:53:03 -05:00
Robby Findler
e2f1611ab4 adjusted the color for 'is-documented' bindings in online check syntax to be
green so it doesn't look anythign close to how the "yellow" error messages
look
2011-09-21 22:52:59 -05:00
Robby Findler
8e5bb730b3 guard a use of get-root-data in the token tree implementation
closes PR 12072
2011-09-16 19:04:14 -05:00
Robby Findler
89ef65a746 fix the collapsed snipclass so that it cooperates with the wxme library and
thus saved files with collapsed snips can be required in non-GUI contexts
2011-09-13 14:58:39 -05:00
Robby Findler
14441264ef Rackety 2011-09-12 10:49:15 -05:00
Vincent St-Amour
68aad051e9 Reduce priority of paren matching highlighting. 2011-09-08 18:01:16 -04:00
Robby Findler
67d17645c4 wrong super interface 2011-09-05 12:33:53 -05:00
Robby Findler
8a30ed73b7 add forgotten file 2011-09-05 09:41:49 -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
171858add1 wrong check for the result of system-type 2011-09-02 08:58:22 -05:00
Robby Findler
49dbb5d963 adjust the close/close window/close tab menu items to be more like other apps on the various platforms 2011-09-01 10:53:09 -05:00
Robby Findler
8f6fb87597 adjust keybindings to free up <menukey>-r for "Run" and <menukey>-t for "New Tab" 2011-09-01 10:53:07 -05:00
Robby Findler
ce0da835ce adjust the 'recently opened files' menu item so its contents are contain fewer redundant entries
amusingly I was reminded to do this by Matthew's recent commit message
saying that normal-case-path is usually a bad idea
2011-08-30 16:11:00 -05:00
Robby Findler
9fcc12b6a0 adjust drracket to be more accomodating in the presence of hostile filesystems 2011-08-27 16:41:35 -05:00
Robby Findler
6823941080 adjust framework get and put file functions to use simple-form-path instead
of normalize-path (I'm unsure of the ramifications of this change ...)
2011-08-27 07:54:11 -05:00
Robby Findler
1d13d1399c adjust the framework get file dialog functions to not call normalize-path unless
they've recently checked to see if the file exists
2011-08-27 07:54:10 -05:00
Robby Findler
9817820e4c remove non-existent files from the 'open recent' menu (but only when the file is selected) 2011-08-25 12:33:33 -05:00
Robby Findler
dc326c9501 change some prints to fprintfs to make it easier to remove debugging printfs from this file when checking in 2011-08-10 12:02:49 -05:00
Robby Findler
83e70af006 fix the initial frame position code for the multiple monitors case 2011-08-10 12:02:49 -05:00
Robby Findler
40c68df514 fix the auto-square-bracket thing for with-syntax
closes PR 12096
2011-08-08 19:30:13 -05:00
Robby Findler
38596a9b58 manage the state for delegates better (used by the drracket contour window)
closes PR 12094
2011-08-07 18:39:22 -05:00
Robby Findler
fc50be1caa when moving the insertion point due to a search, use call-as-primary-owner
to scroll the right editor
   closes PR 12080
2011-08-05 23:33:51 -05:00
Robby Findler
a090a0e903 adjust the tabify and tabify-selection methods so they do nothing when the colorer is frozen or stopped
closes PR 12087
2011-08-05 21:39:31 -05:00
Robby Findler
29a843ac37 get rid of a broken attempt to optimize the 20,000-ft overview refreshing
closes PR 12083
2011-08-03 09:58:23 -05:00
John Clements
e178dbc4f2 unimportant tabbing fixup 2011-07-28 22:51:00 -04:00
Robby Findler
eba9c56d8c adjust the control-s keybinding so that it behaves like the menu shortcut
keep the old keybinding on esc;% (only under linux)
2011-07-25 13:40:15 -04:00
Robby Findler
2a78ea9723 change autowrapping preference default
please merge to release branch
2011-07-19 16:17:04 -05:00
Robby Findler
3fa2cc0d67 adjust the size-pref frame mixin to track the position of the frame in a multi-monitor sensitive way
(also fix various issues with that code and unify the framework and drracket way of doing this)
2011-07-19 16:16:50 -05:00
Matthew Flatt
5e0d6e0dee fix void result to match contract
Merge to 5.1.2 if Robby agrees
2011-07-16 14:30:08 -06:00
John Clements
b14ac37d99 added automatic parens preference 2011-07-12 12:23:08 -07:00
Eli Barzilay
3157955d40 ".ss" -> ".rkt" scan done. 2011-07-02 10:37:53 -04:00
Eli Barzilay
78dacef817 Get rid of "defaultly"s. 2011-06-28 02:11:24 -04:00
Eli Barzilay
40124a0619 A long overdue scan to eliminate files without terminating newlines.
(DrRacket should really do that.)
2011-06-28 02:01:41 -04:00
Robby Findler
f93ff4de26 added get-pos/text-dc-location method to editor:basic in framework 2011-06-26 15:49:55 +08:00
Eli Barzilay
ac26fe7554 A ton of @scheme*' -> @racket*' and related updates.
Also, updates some of the mzlib files to point at `racket/*' libraries
rather than to `scheme/*' ones.
2011-06-25 04:08:47 -04:00
Robby Findler
e008fc3399 improved the error messsage for contract violations of preferences:add-callback 2011-06-20 15:09:00 +08:00
Robby Findler
524d533392 added edit-sequence when flushing the delegate updates 2011-06-17 15:46:52 +08:00
Robby Findler
24d11805ac attempt to try to make the contour window feel faster by delaying the work until nothing has happened for 250 msec 2011-06-17 12:43:14 +08:00
Eli Barzilay
1582f160bc * Make the drracket `default-filters' have a ";"-separated glob for all
patterns instead of one pattern per suffix.  (This was almost never
  used -- only when saving a file that is in text mode.)

* Since this default is the same that the scheme
  mode ("framework/private/scheme.rkt") sets, remove that
  setting.  (Leave it commented in case there's need to have some
  different global default.)  It makes the above default get used when
  saving a scheme-mode file.

* Finally, for some reason the code in "framework/private/finder.rkt"
  was not using these `default-filters' at all for the file open dialog
  in `*get-file'.  (I tracked it back to CVS when the code was written,
  and it was never used.)

  I made it use it now.  This is visible on gtk (and probably on
  windows, not sure what OSX does) in that openning a file would show
  you all files.  After this change, it would show only racket source
  files, but there will be an option to switch the pattern to show all files.

  ** If the previous setup (showing all files) was intentional, it would
     be better to simply change "drracket/private/main.rkt" to add the
     racket source globs before the default.  In that case it might also
     make sense to uncomment the change in scheme.rkt back in, so when
     saving the default is the racket file suffixes (but this sounds
     like a confusing UI).
2011-06-02 10:06:15 -04:00
Robby Findler
1b838cf85a add c:x;t as a keybinding for the latex shortcuts
closes PR 11871
2011-05-10 15:34:47 -05:00