adjust uses of after-load-file to use the success? flag

(cherry picked from commit fcc720f43e)
This commit is contained in:
Robby Findler 2011-10-08 10:42:32 -05:00 committed by Eli Barzilay
parent c993d856d5
commit fcd5fb9d74
2 changed files with 19 additions and 17 deletions

View File

@ -1519,7 +1519,7 @@
(inner (void) after-delete start end))
(define/augment (after-load-file success?)
(buffer-modified)
(when success? (buffer-modified))
(inner (void) after-load-file success?))
(super-new)))

View File

@ -295,10 +295,11 @@
(define/augment (after-load-file success?)
(inner (void) after-load-file success?)
(when success?
(set! ranges (make-hash))
(set! ranges-low 0)
(set! ranges-high 0)
(set! ranges-list #f))
(set! ranges-list #f)))
(define/public (highlight-range start end color [caret-space? #f] [priority 'low] [style 'rectangle])
(unless (let ([exact-pos-int?
@ -1816,6 +1817,7 @@
(mixin ((class->interface text%)) (crlf-line-endings<%>)
(inherit get-filename use-file-text-mode)
(define/augment (after-load-file success?)
(when success?
(cond
[(preferences:get 'framework:always-use-platform-specific-linefeed-convention)
(use-file-text-mode #t)]
@ -1827,7 +1829,7 @@
(regexp-match? unix-line-endings-regexp port)))))
(use-file-text-mode
(and (eq? (system-type) 'windows)
(not unix-endings?)))])
(not unix-endings?)))]))
(inner (void) after-load-file success?))
(super-new)