diff --git a/collects/drscheme/private/eval.ss b/collects/drscheme/private/eval.ss index d4bc45a968..ac64a98503 100644 --- a/collects/drscheme/private/eval.ss +++ b/collects/drscheme/private/eval.ss @@ -46,8 +46,11 @@ (let* ([text (drscheme:language:text/pos-text input)] [start (drscheme:language:text/pos-start input)] [end (drscheme:language:text/pos-end input)] - [text-port (open-input-text-editor text start end values - (send text get-port-name))]) + [name (if (method-in-interface? 'get-port-name + (object-interface text)) + (send text get-port-name) + (send text get-filename))] + [text-port (open-input-text-editor text start end values name)]) (port-count-lines! text-port) (let* ([line (send text position-paragraph start)] [column (- start (send text paragraph-start-position line))] diff --git a/collects/drscheme/private/unit.ss b/collects/drscheme/private/unit.ss index 0af19fc538..264286df8c 100644 --- a/collects/drscheme/private/unit.ss +++ b/collects/drscheme/private/unit.ss @@ -2256,7 +2256,9 @@ module browser threading seems wrong. (let ([start 0]) (send definitions-text split-snip start) - (let* ([name (send definitions-text get-port-name)] + (let* ([name (if (method-in-interface? 'get-port-name (object-interface definitions-text)) + (send definitions-text get-port-name) + (send definitions-text get-filename))] [text-port (open-input-text-editor definitions-text start 'end values name #t)]) (port-count-lines! text-port) (let* ([line (send definitions-text position-paragraph start)]