From 2af59441ba920d2f2e661d074b002bdacdc649e0 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 8 Feb 2005 16:50:54 +0000 Subject: [PATCH] . original commit: efb9a7cf71f5cdc654a0f77935bd8a47666d547c --- collects/framework/private/editor.ss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/collects/framework/private/editor.ss b/collects/framework/private/editor.ss index 97b0be3f..d5bd4b2f 100644 --- a/collects/framework/private/editor.ss +++ b/collects/framework/private/editor.ss @@ -405,7 +405,9 @@ (interface (-keymap<%>) get-filename/untitled-name get-can-close-parent - update-frame-filename)) + update-frame-filename + allow-close-with-no-filename?)) + (define file-mixin (mixin (-keymap<%>) (file<%>) (inherit get-filename lock get-style-list @@ -447,9 +449,12 @@ (update-frame-filename))])) (inherit save-file) + (define/public (allow-close-with-no-filename?) #f) (define/augment (can-close?) (let* ([user-allowed-or-not-modified (or (not (is-modified?)) + (and (not (get-filename)) + (allow-close-with-no-filename?)) (case (gui-utils:unsaved-warning (get-filename/untitled-name) (string-constant close-anyway)