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
|
||||
(require scheme/class
|
||||
scheme/gui
|
||||
scheme/pretty
|
||||
unstable/gui/notify
|
||||
"interfaces.ss"
|
||||
"partition.ss")
|
||||
|
@ -54,11 +55,12 @@
|
|||
(add-function "copy-syntax-as-text"
|
||||
(lambda (_ event)
|
||||
(define stx (send controller get-selected-syntax))
|
||||
(when stx
|
||||
(send the-clipboard set-clipboard-string
|
||||
(if stx
|
||||
(format "~s" (syntax->datum stx))
|
||||
"")
|
||||
(send event get-time-stamp))))
|
||||
(let ([out (open-output-string)])
|
||||
(pretty-print (syntax->datum stx) out)
|
||||
(get-output-string out))
|
||||
(send event get-time-stamp)))))
|
||||
|
||||
(add-function "clear-syntax-selection"
|
||||
(lambda (i e)
|
||||
|
|
Loading…
Reference in New Issue
Block a user