Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Alternative design for keymap code



"Anthony J Heading" wrote:
> After reflecting for a while,  I believe there's still value in some of the
> design.    And I'm thinking instead that maybe there should be a shell
> parameter  KEYMAP/keymap  pair,  which specificies the prevailing set of
> keymaps.  These are searched in order.   Shell function are then able to
> push their own map onto the head the list if they need.  And by allowing
> the KEYMAP parameter to be function-local,  exit cleanup is automatic.

Just some thoughts while I'm waiting to go to a conference dinner: perhaps
these should be ZKEYMAP and zkeymap since we`re trying to keep the
parameter list reasonably unpolluted.  Also, if these are going to be tied,
then they should probably be normal rather than special tied arrays, since
if I remember right (I try hard never to look at this in the code since it
gives me nightmares, but it would seem I do) making special parameters
local still doesn`t work.  Maybe we should fix this, then I could sleep at
nights.  The problem is keeping them special and restoring the values, but
this has been pretty much solved for `special=value builtin' so it
shouldn't be too hard to solve it here as well.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



Messages sorted by: Reverse Date, Date, Thread, Author