- Subject: Re: Trouble with mail_mode (email.sl et al.)
- From: "G. Milde" <milde@xxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 3 Jul 2009 23:32:42 +0200
On  2.07.09, Swithun Crowe wrote:
> There are probably some other ways of achieving what you want, given the 
> flexibility of jed.
Indeed.
1. You can call Jed with the mode.
In my muttrc, I have:
   set editor="xjed %s -tmp --mail_mode"
2. You can set the mode on any test that is possible with S-Lang in a
   function you add to _jed_set_mode_hooks.
In my jed.rc, I have:
% set modes based on filename or more complicated patterns
static define set_modes_hook(ext)
{
   switch (path_basename(buffer_filename()))
     { case ".pycmailrc":  python_mode(); return 1; }
     { case "Makefile":    make_mode();   return 1; }
     { case ".bashrc":     sh_mode();  return 1; }
   return(0);
}
append_to_hook("_jed_set_mode_hooks", &set_modes_hook);
Günter
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
  [2009 date index]
  [2009 thread index]
  
  [Thread Prev] [Thread Next]
      
  [Date Prev] [Date Next]