From 05fbd0ffd3f0281934194f08388d76f21bc2de4a Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 31 Oct 2008 14:44:32 +0000 Subject: [PATCH] fix problem with simplifying module-rename contexts that have marked renamings svn: r12195 --- collects/parser-tools/parser-tools.scrbl | 2 +- collects/scribblings/reference/syntax.scrbl | 2 +- src/mred/wxme/wx_medad.cxx | 62 ++++++++++----------- src/mzscheme/src/stxobj.c | 3 +- 4 files changed, 35 insertions(+), 34 deletions(-) diff --git a/collects/parser-tools/parser-tools.scrbl b/collects/parser-tools/parser-tools.scrbl index 376b9eb1d4..89b0bdf5dc 100644 --- a/collects/parser-tools/parser-tools.scrbl +++ b/collects/parser-tools/parser-tools.scrbl @@ -347,7 +347,7 @@ Repetition of @scheme[re] sequence 0 or more times.} @defform[(+ re ...)]{ -Repetition of @scheme[re] sequence 0 or more times.} +Repetition of @scheme[re] sequence 1 or more times.} @defform[(? re ...)]{ diff --git a/collects/scribblings/reference/syntax.scrbl b/collects/scribblings/reference/syntax.scrbl index c98d287524..d17f198c91 100644 --- a/collects/scribblings/reference/syntax.scrbl +++ b/collects/scribblings/reference/syntax.scrbl @@ -568,7 +568,7 @@ follows. (for-meta phase-level provide-spec ...)]{ Like the union of the @scheme[provide-spec]s, but adjusted to apply to @tech{phase level} specified by @scheme[phase-level] (where @scheme[#f] corresponds to the - @tech{label phase level}). In particular, an @scheme[id] or @scheme[rename-out] form as + @tech{label phase level}). In particular, an @scheme[_id] or @scheme[rename-out] form as a @scheme[provide-spec] refers to a binding at @scheme[phase-level], an @scheme[all-define-out] exports only @scheme[phase-level] definitions, and an @scheme[all-from-out] exports bindings diff --git a/src/mred/wxme/wx_medad.cxx b/src/mred/wxme/wx_medad.cxx index ba67c03162..f5c52d17a1 100644 --- a/src/mred/wxme/wx_medad.cxx +++ b/src/mred/wxme/wx_medad.cxx @@ -676,6 +676,37 @@ void wxMediaCanvas::OnPaint(void) need_refresh = FALSE; if (media) { + /* Clear the margins */ + if (xmargin || ymargin) { + wxDC *adc; + wxColor *bg; + bg = GetCanvasBackground(); + if (bg) { + wxBrush *b, *ob; + wxPen *p, *op; + int cw, ch; + + GetClientSize(&cw, &ch); + + b = wxTheBrushList->FindOrCreateBrush(bg, wxSOLID); + p = wxThePenList->FindOrCreatePen("BLACK", 0, wxTRANSPARENT); + adc = GetDC(); + + ob = adc->GetBrush(); + op = adc->GetPen(); + adc->SetBrush(b); + adc->SetPen(p); + + adc->DrawRectangle(0, 0, xmargin, ch); + adc->DrawRectangle(cw-xmargin, 0, cw, ch); + adc->DrawRectangle(0, 0, cw, ymargin); + adc->DrawRectangle(0, ch-ymargin, cw, ch); + + adc->SetBrush(ob); + adc->SetPen(op); + } + } + if (!media->printing) { double w, h, x, y; GetView(&x, &y, &w, &h); @@ -824,37 +855,6 @@ void wxMediaCanvas::Redraw(double localx, double localy, double fw, double fh) GetView(&x, &y, &w, &h); - /* Clear the margins */ - if (xmargin || ymargin) { - wxDC *adc; - wxColor *bg; - bg = GetCanvasBackground(); - if (bg) { - wxBrush *b, *ob; - wxPen *p, *op; - int cw, ch; - - GetClientSize(&cw, &ch); - - b = wxTheBrushList->FindOrCreateBrush(bg, wxSOLID); - p = wxThePenList->FindOrCreatePen("BLACK", 0, wxTRANSPARENT); - adc = GetDC(); - - ob = adc->GetBrush(); - op = adc->GetPen(); - adc->SetBrush(b); - adc->SetPen(p); - - adc->DrawRectangle(0, 0, xmargin, ch); - adc->DrawRectangle(cw-xmargin, 0, cw, ch); - adc->DrawRectangle(0, 0, cw, ymargin); - adc->DrawRectangle(0, ch-ymargin, cw, ch); - - adc->SetBrush(ob); - adc->SetPen(op); - } - } - right = x + w; bottom = y + h; diff --git a/src/mzscheme/src/stxobj.c b/src/mzscheme/src/stxobj.c index 7fe7a9dc67..ad1128d326 100644 --- a/src/mzscheme/src/stxobj.c +++ b/src/mzscheme/src/stxobj.c @@ -4897,7 +4897,8 @@ static Scheme_Object *wraps_to_datum(Scheme_Object *w_in, if (mrn->kind == mzMOD_RENAME_MARKED) { /* Not useful if there's no marked names. */ redundant = ((mrn->sealed >= STX_SEAL_ALL) - && (!mrn->marked_names || !mrn->marked_names->count)); + && (!mrn->marked_names || !mrn->marked_names->count) + && SCHEME_NULLP(mrn->shared_pes)); if (!redundant) { /* Otherwise, watch out for multiple instances of the same rename: */ WRAP_POS l;