jed-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Namespaces for modes?


On Sun, Jul 20, 2003 at 05:09:45PM +0200, Paul Boekholt wrote:
> On Tue, Jul 15, 2003 at 09:47:03AM +0200, Guenter Milde wrote:
> > Functions that are only used by the same mode or derived modes can be in the
> > named namespace (although I sometimes use mode_* even there, for clarity
> > within the mode.sl file).
> > This also works for functions to be bound to the modes keymap or menu entries
> > with e.g.
> >   definekey("mode->fun", Key_F11);
> The next version of cal.sl will have a function mark_diary_entries() that
> will highlight dates for which you have diary entries. Users may want their
> appointments highlighted on starting the calendar with some lines in their
> .jedrc:
> 
> autoload("mark_diary_entries", "cal");
> define calendar_mode_hook()
> {
>    mark_diary_entries();
> }
> 
> If mark_diary_entries() were static this wouldn't be possible - you would
> have to require("cal") which is 600 lines.

I have to admit, that named namespaces have some drawbacks too... I use
them for functions I don't want the average user to access directly.

However, you could define a custom variable like Cal_Mark_Diary_Entries
and the user puts

  variable Cal_Mark_Diary_Entries = 1;

into her .jedrc...

Günter


-- 
Milde at ife.et.tu-dresden.de

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]