diff --git a/collects/framework/private/editor.ss b/collects/framework/private/editor.ss index 8769206c..03fee925 100644 --- a/collects/framework/private/editor.ss +++ b/collects/framework/private/editor.ss @@ -92,17 +92,27 @@ [super-after-load-file after-load-file]) [define last-saved-file-time #f] - (override after-save-file after-load-file) - [define after-save-file + [define/override after-save-file (lambda (sucess?) - (when sucess? + + ;; update recently opened file names + (let* ([temp-b (box #f)] + [filename (get-filename temp-b)]) + (unless (unbox temp-b) + (when filename + (handler:add-to-recent filename)))) + + ;; update last-saved-file-time + (when sucess? (let ([filename (get-filename)]) (set! last-saved-file-time (and filename (file-exists? filename) (file-or-directory-modify-seconds filename))))) + (super-after-save-file sucess?))] - [define after-load-file + + [define/override after-load-file (lambda (sucess?) (when sucess? (let ([filename (get-filename)]) @@ -122,15 +132,6 @@ (let ([ms (file-or-directory-modify-seconds fn)]) (< last-saved-file-time ms))))))] - (rename [super-on-save-file on-save-file]) - (define/override (on-save-file filename format) - (let* ([temp-b (box #f)] - [filename (get-filename temp-b)]) - (unless (unbox temp-b) - (when filename - (handler:add-to-recent filename)))) - (super-on-save-file filename format)) - [define has-focus #f] (rename [super-on-focus on-focus]) (override on-focus) diff --git a/collects/framework/private/finder.ss b/collects/framework/private/finder.ss index cba42505..2d7cfea5 100644 --- a/collects/framework/private/finder.ss +++ b/collects/framework/private/finder.ss @@ -683,8 +683,8 @@ filter-msg ; file-filter-msg )))) - ; the std- and common- forms both have opt-lambda's, with the same - ; list of args. Should the opt-lambda's be placed in the dispatching function? + ; the std- and common- forms both have opt-lambda's, with the same + ; list of args. Should the opt-lambda's be placed in the dispatching function? (define std-put-file (opt-lambda ([name #f] diff --git a/collects/framework/private/handler.ss b/collects/framework/private/handler.ss index ef3312b3..6d132435 100644 --- a/collects/framework/private/handler.ss +++ b/collects/framework/private/handler.ss @@ -1,3 +1,4 @@ + (module handler mzscheme (require (lib "unitsig.ss") (lib "class.ss")