File tree Expand file tree Collapse file tree
gui-doc/scribblings/framework Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7474 @defmethod*[(((tabify (start-pos exact-integer?
7575 (send this get-start-position)))
7676 void?))]{
77- Tabs the line containing by @racket[start-pos]
77+ Tabs the line containing by @racket[start-pos]. See also @racket[racket:current-tabify-reverse].
7878 }
7979
8080 @defmethod*[(((tabify-selection (start exact-integer? (send this get-start-position))
8181 (end exact-integer? (send this get-end-position)))
8282 void?))]{
8383 Sets the tabbing for the lines containing positions @racket[start]
84- through @racket[end].
84+ through @racket[end]. See also @racket[racket:current-tabify-reverse].
8585 }
8686
8787 @defmethod*[(((tabify-all) void?))]{
88- Tabs all lines.
88+ Tabs all lines. See also @racket[racket:current-tabify-reverse].
8989
9090 Indentation results depend on the graphical context associated with the object;
9191 if there is not one, the indentation is based on the assumption that a fixed-width
Original file line number Diff line number Diff line change @@ -1639,7 +1639,18 @@ are currently open in tabs.
16391639 (listof (list/c symbol? symbol?))
16401640 @{The default parentheses that are matched when using @racket[racket:text-mode-mixin].
16411641
1642- @history[#:added "1.60 " ]})
1642+ @history[#:added "1.60 " ]})
1643+
1644+ (parameter-doc
1645+ racket:current-tabify-reverse
1646+ (parameter/c boolean?)
1647+ reverse?
1648+ @{A parameter that indicates whether tabbing should cycle through options (if any ) in reverse mode.
1649+ This parameter is meant to be set before calling @method[racket:text<%> tabify],
1650+ @method[racket:text<%> tabify-selection], or @method[racket:text<%> tabify-all],
1651+ although default implementations of those methods do not use the parameter.
1652+
1653+ @history[#:added "1.77 " ]})
16431654
16441655 (proc-doc/names
16451656 racket:add-preferences-panel
Original file line number Diff line number Diff line change 4848 ("[ " . "] " )
4949 ("{ " . "} " )))
5050
51+ (define current-tabify-reverse (make-parameter #f ))
52+
5153(define text-balanced?
5254 (lambda (text [start 0 ] [in-end #f ])
5355 (let* ([end (or in-end (send text last-position))]
17141716 (λ (x) (send x select-up-sexp)))
17151717 (add-edit-function "tabify-at-caret "
17161718 (λ (x) (send x tabify-selection)))
1719+ (add-edit-function "reverse-tabify-at-caret "
1720+ (λ (x) (parameterize ([current-tabify-reverse #t ])
1721+ (send x tabify-selection))))
17171722 (add-edit-function "do-return "
17181723 (λ (x) (send x insert-return)))
17191724 (add-edit-function "comment-out "
18271832 (send keymap map-function key func))
18281833
18291834 (map "TAB " "tabify-at-caret " )
1835+ (map "s:TAB " "reverse-tabify-at-caret " )
18301836
18311837 (map "return " "do-return " )
18321838 (map "s:return " "do-return " )
Original file line number Diff line number Diff line change 418418
419419 text-balanced?
420420
421- default-paren-matches))
421+ default-paren-matches
422+ current-tabify-reverse))
422423
423424 (define-signature main-class^ ())
424425 (define-signature main^ extends main-class^ ())
Original file line number Diff line number Diff line change 3434
3535(define pkg-authors '(mflatt robby))
3636
37- (define version "1.76 " )
37+ (define version "1.77 " )
3838
3939(define license
4040 '(Apache-2.0 OR MIT))
You can’t perform that action at this time.
0 commit comments