fix result of editor<%> `load-file' when the editor is locked

relevant to PR 11590
This commit is contained in:
Matthew Flatt 2011-01-04 06:11:46 -07:00
parent b0309ae99e
commit b0ed2f5bc2
2 changed files with 4 additions and 2 deletions

View File

@ -1907,7 +1907,7 @@
[any? [replace-styles? #f]])
(if (or s-user-locked?
(not (zero? write-locked)))
'guess ;; FIXME: docs say that this is more specific
'standard
(do-insert-file (method-name 'pasteboard% 'insert-file) f replace-styles?)))
(define/private (do-insert-file who f clear-styles?)

View File

@ -2592,7 +2592,9 @@
[(symbol-in guess same copy standard text text-force-cr) [format 'guess]]
[any? [replace-styles? #t]])
(if (or write-locked? s-user-locked?)
'guess ;; FIXME: docs say that this is more specific
(if (not (detect-wxme-file (method-name 'text% 'insert-file) f #t))
'text
'standard)
(do-insert-file (method-name 'text% 'insert-file) f format replace-styles?)))
(define/private (do-insert-file who f fmt clear-styles?)