macro-debugger: pretty-print copied syntax
svn: r17355 original commit: be6fb953bc1c767927557484e2da2528d421ba60
This commit is contained in:
parent
f07531a360
commit
b054af81c2
|
@ -1,6 +1,7 @@
|
||||||
#lang scheme/base
|
#lang scheme/base
|
||||||
(require scheme/class
|
(require scheme/class
|
||||||
scheme/gui
|
scheme/gui
|
||||||
|
scheme/pretty
|
||||||
unstable/gui/notify
|
unstable/gui/notify
|
||||||
"interfaces.ss"
|
"interfaces.ss"
|
||||||
"partition.ss")
|
"partition.ss")
|
||||||
|
@ -54,11 +55,12 @@
|
||||||
(add-function "copy-syntax-as-text"
|
(add-function "copy-syntax-as-text"
|
||||||
(lambda (_ event)
|
(lambda (_ event)
|
||||||
(define stx (send controller get-selected-syntax))
|
(define stx (send controller get-selected-syntax))
|
||||||
(send the-clipboard set-clipboard-string
|
(when stx
|
||||||
(if stx
|
(send the-clipboard set-clipboard-string
|
||||||
(format "~s" (syntax->datum stx))
|
(let ([out (open-output-string)])
|
||||||
"")
|
(pretty-print (syntax->datum stx) out)
|
||||||
(send event get-time-stamp))))
|
(get-output-string out))
|
||||||
|
(send event get-time-stamp)))))
|
||||||
|
|
||||||
(add-function "clear-syntax-selection"
|
(add-function "clear-syntax-selection"
|
||||||
(lambda (i e)
|
(lambda (i e)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user