Commit Graph

8 Commits

Author SHA1 Message Date
Robby Findler
ab55d43312 give up on the "find the close paren strategy that doesn't
edit the buffer" attempt

In other words, go back to (a rackety version of) the old
implementation of the get-close-paren method
2013-02-03 11:22:46 -06:00
Robby Findler
8aa3e1d473 another close-paren insertion repair
(this one causes runtime errors, not
bad behavior)
2013-02-02 09:10:17 -06:00
Robby Findler
8aadc03719 more close paren adjustment repairs 2013-01-31 21:11:11 -06:00
Robby Findler
219f9dc358 fix close paren correction code 2013-01-31 15:07:20 -06:00
Robby Findler
e43583c444 make sure the framework tests run with the proper environment 2013-01-26 07:49:14 -06:00
Nadeem Abdul Hamid
c0a412ed0e fix close parens behavior in interactions and comments 2012-12-04 20:39:10 -06:00
Nadeem Abdul Hamid
8f3343cd01 automatic parenthesis mode improvements
Handle close parentheses in a smarter way while in
auto-parens mode and be a little more smart about
inserting brace pairs in general.

In summary:

 - Add some "smart-skip" behavior to insert-close-paren,
   described in the documentation.
    - When auto-parens mode is enabled,
      the existing "balance-parens" keybinding invokes
      insert-close-paren with a smart-skip argument of
      'adjacent
    - A new "balance-parens-forward" keybinding invokes
      insert-close-paren with a smart-skip argument of
      'forward (whether or not auto-parens mode is
      enabled)

 - Enable basic smart-skip behavior for
   strings ("...") and |...| pairs, specifically, typing
   a double-quote or bar character when the cursor
   immediately precedes one causes the cursor to simply
   skip over the existing one

 - Tweak auto-insertion of block comment pairs; i.e.
   typing hash and a bar results in a properly balanced
   #||# pair. Also, when you type a bar character when
   the cursor immediately precedes a closing bar and
   hash of a comment, then the cursor skips over both
   characters (this seems better than having it just
   skip over the bar, and then having to introduce a
   new keybinding to detect when a hash is typed while
   the cursor is between a bar and a hash)

 - In strings and line/block comments, auto-parens mode
   no longer has any effect (you can still use the M+..
   keybindings to force insertion of a particular brace
   pair)

 - Detect when a character constant is being typed, and
   don't insert brace pairs if so; i.e. if the cursor
   is immediately after #\ , then typing any open parens,
   double quote, or bar, does _not_ result in the
   insertion of an open/close pair even in auto-parens
   mode

 - Add a bunch of tests related to auto-parens, matching
   pairs of braces, strings, comments, etc. to
   collects/tests/framework/racket.rkt
2012-11-25 21:57:52 -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