[Conkeror] change to `interactive'
John J Foerch
jjfoerch at earthlink.net
Thu Sep 11 09:56:19 PDT 2008
Hello,
I pushed a change to the `interactive' function that will affect
anyone who has command definitions in their rc. There are two changes.
The first one is the main one. The second one may not affect anyone.
* The second arg to interactive, `doc' is now a required positional
argument. It may be null.
* interactive no longer accepts the keyword $prefix. Instead, it takes
as its fourth parameter an `options' object that may contain a key
called `prefix'. For examples on its use, see the universal-argument
commands.
This change was done in preparation for, and as a first step of, the
need to remove the keyword-arguments system from conkeror. Those of you
who have tried the newest xulrunner nightly snapshot will have noticed
that it won't run conkeror anymore. This is because keyword-arguments
depends on a non-standard behavior of earlier versions of the javascript
engine, which has now been fixed in the recent nightlies. Thus we lose
the cool $keyword syntax in function calls, but we can replace it with a
method that may be easier to understand in the long run.
Instead of keywords, keyword functions will just use a simple
positional argument called `options'. See `interactive' for an example.
While making `doc' a required positional arg was not a strictly
necessary change, it seemed like a prudent change in the interest of
simplicity---interactive no longer needs to typecheck its arguments to
mimick emacs-style optional docstrings, making it easier to add new
functionality to interactive in the future.
I would also like to put out the idea that interactive's `doc'
argument could be given in the `options' object instead of as a
positional parameter. It makes some sense to put it there because it is
in fact "optional". If there is general consensus on that change, I
would be willing to implement it, but I don't have much opinion one way
or the other.
--
John Foerch
More information about the Conkeror
mailing list