[mcclim-devel] unsupplied-argument-marker

Christophe Rhodes csr21 at cantab.net
Sun Feb 22 11:24:34 UTC 2009


I think that *unsupplied-argument-marker* (and
*numeric-argument-marker*) should not be uninterned symbols or conses.
The basic reason is that

  (define-command-table foo-menu-table
    :menu (("Foo" (com-foo #.*unsupplied-argument-marker*))))

or any other use of the literal value of the markers will not survive
a compile-file/load-fasl cycle: a "similar" but not EQ value will be
constructed.  This causes PARTIAL-COMMAND-P to fail, and confusion to
reign.  Patch attached (making the markers uninterned symbols -- one
could imagine cleverer, interned struct representations, but that's
probably overkill).

Also attached is a proposed adjustment to the READ-FRAME-COMMAND
:AROUND handling of menu-items and partial commands.  At the moment,
the method only attempts to fill in partial command arguments if the
input stream is an interactor-pane; and command-line-read-arguments is
hardcoded.  The second piece of the attached patch removes both of
these restrictions, which is what is needed for my application, but
I'm unsure of the general ramifications.

(I need the removal of the interactor-pane requirement because
esa:minibuffer-pane is not a clim:interactor-pane.  I'm not sure why
not, nor what the protocol requirements on interactor-panes are.)

Comments?  I think that these changes are fairly safe, but there might
be better fixes that are less conservative.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcp.diff
Type: text/x-diff
Size: 1842 bytes
Desc: proposed fixes
URL: <https://mailman.common-lisp.net/pipermail/mcclim-devel/attachments/20090222/d1af0daa/attachment.diff>

More information about the mcclim-devel mailing list