jed-extra more user friendly

Paul Boekholt p.boekholt@hetnet.nl
Sat, 07 May 2005 10:23:30 +0200


On Fri, 6 May 2005 19:55:45 +0200, Jörg Sommer <joerg@alea.gnuu.de> said:
> Hi,

> how do you think about adding this lines to /etc/jed-init.d/55mail.sl?

> #v+
> define _debian_set_mail_mode_hook(ext)
> {
>    $1 =3D extract_filename( buffer_filename() );

>    !if (andelse {strncmp($1, "mutt-", 5)} {strncmp($1, "SLRN", 4)} ) {
>       mail_mode();
>       return 1;
>    }

>    return 0;
> }
> add_to_hook("_jed_set_mode_hooks", &_debian_set_mutt_mode_hook);
> #v-

Since JED 0.99-17 comes with a mail-mode called mailedit mode, we
should probably just let the user decide.  BTW in the wildcard module
(http://www.cheesit.com/downloads/slang/slwildcard) I have a demo script
called wc_hook.sl that can do this with two lines:

add_mode_for_wildcard("mail", "SLRN*");
add_mode_for_wildcard("mail", "mutt-*");

>  BTW: Does anyone see why /aaa/ and _aaa_ not work?
With the highlighting in email.sl you mean?  It works fine here, they
are highlighted as keywords, unless you expected something else?
BTW the DFA highlighting has the disadvantage that UTF-8 characters
become unreadable.  So maybe the highlighting scheme of mailedit mode
is better.