macro-stepper: add option to disable reader macro abbreviations
original commit: fcbe778de08d284ca78d034acd1995420f539632
This commit is contained in:
parent
00b639c611
commit
6ba324efa3
|
@ -41,7 +41,8 @@
|
|||
(length (send/i config config<%> get-colors))
|
||||
(send/i config config<%> get-suffix-option)
|
||||
(send config get-pretty-styles)
|
||||
columns))
|
||||
columns
|
||||
(send config get-pretty-abbrev?)))
|
||||
(define output-string (get-output-string output-port))
|
||||
(define output-length (sub1 (string-length output-string))) ;; skip final newline
|
||||
(fixup-parentheses output-string range)
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
;; suffix-option : SuffixOption
|
||||
(define-notify suffix-option (new notify-box% (value 'over-limit)))
|
||||
|
||||
;; pretty-abbrev? : boolean
|
||||
(define-notify pretty-abbrev? (new notify-box% (value #t)))
|
||||
|
||||
;; pretty-styles : ImmutableHash[symbol -> symbol]
|
||||
(define-notify pretty-styles
|
||||
(new notify-box% (value (make-immutable-hasheq null))))
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
|
||||
;; FIXME: Need to disable printing of structs with custom-write property
|
||||
|
||||
;; pretty-print-syntax : syntax port partition number SuffixOption hasheq number
|
||||
;; pretty-print-syntax : syntax port partition number SuffixOption hasheq number bool
|
||||
;; -> range%
|
||||
(define (pretty-print-syntax stx port primary-partition colors suffix-option styles columns)
|
||||
(define (pretty-print-syntax stx port
|
||||
primary-partition colors suffix-option styles columns abbrev?)
|
||||
(define range-builder (new range-builder%))
|
||||
(define-values (datum ht:flat=>stx ht:stx=>flat)
|
||||
(syntax->datum/tables stx primary-partition colors suffix-option))
|
||||
|
@ -45,6 +46,7 @@
|
|||
[pretty-print-size-hook pp-size-hook]
|
||||
[pretty-print-print-hook pp-print-hook]
|
||||
[pretty-print-remap-stylable pp-remap-stylable]
|
||||
[pretty-print-abbreviate-read-macros abbrev?]
|
||||
[pretty-print-current-style-table (pp-better-style-table styles)]
|
||||
[pretty-print-columns columns])
|
||||
(pretty-print/defaults datum port)
|
||||
|
|
|
@ -209,6 +209,9 @@
|
|||
(menu-option/notify-box extras-menu
|
||||
"Draw binding arrows"
|
||||
(get-field draw-arrows? config))
|
||||
(menu-option/notify-box extras-menu
|
||||
"Enable reader abbreviations"
|
||||
(get-field pretty-abbrev? config))
|
||||
(menu-option/notify-box extras-menu
|
||||
"Extra navigation"
|
||||
(get-field extra-navigation? config)))
|
||||
|
|
|
@ -158,6 +158,8 @@
|
|||
(send/i sbc sb:controller<%>
|
||||
listen-selected-syntax
|
||||
(lambda (stx) (send/i macro-hiding-prefs hiding-prefs<%> set-syntax stx)))
|
||||
(send config listen-pretty-abbrev?
|
||||
(lambda (_) (update/preserve-view)))
|
||||
(send*/i config config<%>
|
||||
(listen-show-hiding-panel?
|
||||
(lambda (show?) (show-macro-hiding-panel show?)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user