added a comment to describe all-string-snips

svn: r17778

original commit: ebb815cc68f87f601a9577fde9e4bbaa1e487082
This commit is contained in:
Robby Findler 2010-01-23 16:43:08 +00:00
parent ebe9e1693e
commit d85ffc7bde

View File

@ -1758,6 +1758,9 @@ WARNING: printf is rebound in the body of the unit to always
(define clever-file-format-mixin
(mixin ((class->interface text%)) (clever-file-format<%>)
(inherit get-file-format set-file-format find-first-snip)
;; all-string-snips : -> boolean
;; returns #t when it is safe to save this file in 'text mode.
(define/private (all-string-snips)
(let loop ([s (find-first-snip)])
(cond
@ -1765,6 +1768,7 @@ WARNING: printf is rebound in the body of the unit to always
[(is-a? s string-snip%)
(loop (send s next))]
[else #f])))
(define/augment (on-save-file name format)
(let ([all-strings? (all-string-snips)])
(cond