[Vimperator] [patch] Mappings refactoring

Виктор Виктор
Tue May 29 09:54:40 PDT 2007


В вт, 2007-05-29 в 11:18 +0200, Martin Stubenschrott написа:
> On Tue, May 29, 2007 at 09:45:37AM +0300, Виктор Кожухаров wrote:
> > I reverted the flags so that the first one starts at 1 << 1.
> 
> Why? 1 << 1 is 2, and I think, flags normally start with 1, 2, 4, 8, ...
> 
> > btw, the hint commands will also have to be changed to be objects. but
> > don't use strings to store a function and then eval it, since it's
> > slower than a closure.
> 
> Yeah, I wanted to convert them to closures anyway.
> 
> > As for the two flags afterwards (what is their
> > name, and what do they do exactly?), when they are added to the flags
> > attribute, make them start from 1 << 10. That way we won't need to
> > change them if we need to add more global flags later on.
> 
> No, I don't see a reason for this, the reason why we have flags is, that
> the code doesn't have to care if the flag has a numeric value of 16 or
> 512, it uses the symbolic name, and this shouldn't have gaps.
I just think it's easier to read that way, not that it's going to
actually break anything (since it wont).
> 
> Also what two flags are you talking about?
the two boolean arguments in the hint_mappings array for each element. I
have no idea what they do.
> 
> --
> Martin
> _______________________________________________
> Vimperator mailing list
> Vimperator at mozdev.org
> http://www.mozdev.org/mailman/listinfo/vimperator
-- 
Виктор Кожухаров /Viktor Kojouharov/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: =?UTF-8?Q?=D0=A2=D0=BE=D0=B2=D0=B0?= =?UTF-8?Q?_=D0=B5?=
	=?UTF-8?Q?_=D1=86=D0=B8=D1=84=D1=80=D0=BE=D0=B2=D0=BE?=
	=?UTF-8?Q?_=D0=BF=D0=BE=D0=B4=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B0?=
	=?UTF-8?Q?_=D1=87=D0=B0=D1=81=D1=82?= =?UTF-8?Q?_=D0=BE=D1=82?=
	=?UTF-8?Q?_=D0=BF=D0=B8=D1=81=D0=BC=D0=BE=D1=82=D0=BE?=
Url : http://www.mozdev.org/pipermail/vimperator/attachments/20070529/227262a5/attachment.bin 


More information about the Vimperator mailing list