Re: Extending slrn's functions in a cross-macro usable way?

"J.B. Nicholson-Owens" <[email protected]>
Newsgroups gmane.network.slrn.user
Organization Forestfield Omnimedia
Message-ID <[email protected]>
John E. Davis wrote:
> Would something like jed's which_key suffice?  It returns a list of
> key sequences that are bound to a specified function.

That sounds like a fine idea.  It would go some way toward totally 
addressing that problem, thanks!  It would be most useful if we could 
know which mode the key is bound in as well.  I'd like to use this to 
temporarily suspend a macro's functionality without having to leave a 
slrn session.

The other part of the problem are unbound functions one still encourages 
other macros to use.  If Global->foo() is a slrn function that does 
something I need to do in a slightly different way so that my macro is 
better integrated into slrn, then I'll have a special version of foo() 
(say My->foo()) that builds on Global->foo().  I'd like to be able to 
call Global->foo() and have it run My->foo() as well.

I was thinking about the following:

- allow hooks before and after Global->foo() so I can break up My->foo() 
and use these hooks.  Once I refactor My->foo() into these hooks I don't 
need My->foo() anymore (and if most people's use of My->foo() can be 
broken into before/after hooks).  I can call Global->foo() whenever I 
need my special version of foo().

- this means many more hooks.

- one has to be careful to avoid recursive calls to the pre- and/or 
post- Global->foo() hook (by calling Global->foo() from within the pre- 
or post- hook).

- this won't work with any internal function executed with call().

What do you think of that?

Thanks again.

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.