Fixed error highlighting in embedded snips.

svn: r10461
This commit is contained in:
Danny Yoo 2008-06-26 20:12:35 +00:00
parent f7939ab35d
commit 448495aa0e
2 changed files with 20 additions and 5 deletions

View File

@ -764,9 +764,7 @@ profile todo:
[frame (cond
[(path? debug-source) (handler:edit-file debug-source)]
[(is-a? debug-source editor<%>)
(let ([canvas (send debug-source get-canvas)])
(and canvas
(send canvas get-top-level-window)))]
(get-enclosing-editor-frame debug-source)]
[else #f])]
[editor (cond
[(path? debug-source)
@ -789,6 +787,23 @@ profile todo:
;; get-enclosing-editor-frame: editor<%> -> (or/c frame% #f)
;; Returns the enclosing frame of an-editor, or #f if we can't find it.
(define (get-enclosing-editor-frame an-editor)
(let ([admin (send an-editor get-admin)])
(cond
[(is-a? admin editor-snip-editor-admin<%>)
(let* ([enclosing-editor-snip (send admin get-snip)]
[editor-snip-admin (send enclosing-editor-snip get-admin)]
[enclosing-editor (send editor-snip-admin get-editor)])
(get-enclosing-editor-frame enclosing-editor))]
[else
(let ([canvas (send an-editor get-canvas)])
(and canvas
(send canvas get-top-level-window)))])))
;
;
;

View File

@ -115,8 +115,8 @@
(documentation-reference #f)
(reader (λ (src port)
(let ([v (parameterize ([read-accept-reader #t])
(with-stacktrace-name
(read-syntax src port)))])
(with-stacktrace-name
(read-syntax src port)))])
(if (eof-object? v)
v
(namespace-syntax-introduce v)))))