Maintaining text% as syntax source, so that check-syntax on an unsaved file will highlight errors correctly.

svn: r10468
This commit is contained in:
Danny Yoo 2008-06-26 23:48:44 +00:00
parent 3010e765ae
commit 072ea01f22
4 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,8 @@
(let txt-loop ([text defs-text])
(cond
[(and (is-a? text text:basic<%>)
(send text port-name-matches? a-stx-source))
(or (send text port-name-matches? a-stx-source)
(eq? text a-stx-source)))
text]
[else
(let snip-loop ([snip (send text find-first-snip)])

View File

@ -46,8 +46,7 @@
(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))])
[text-port (open-input-text-editor text start end values text)])
(port-count-lines! text-port)
(let* ([line (send text position-paragraph start)]
[column (- start (send text paragraph-start-position line))]

View File

@ -2144,8 +2144,7 @@ module browser threading seems wrong.
(let ([start 0])
(send definitions-text split-snip start)
(let* ([name (send definitions-text get-port-name)]
[text-port (open-input-text-editor definitions-text start 'end values name)])
(let* ([text-port (open-input-text-editor definitions-text start 'end values definitions-text #t)])
(port-count-lines! text-port)
(let* ([line (send definitions-text position-paragraph start)]
[column (- start (send definitions-text paragraph-start-position line))]

View File

@ -2432,7 +2432,8 @@ If the namespace does not, they are colored the unbound color.
(syntax-source stx)))
text]
[(and (is-a? text fw:text:basic<%>)
(send text port-name-matches? (syntax-source stx)))
(or (eq? text (syntax-source stx))
(send text port-name-matches? (syntax-source stx))))
(hash-set! source-editor-cache text (syntax-source stx))
text]
[else