logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Folding mode questions: msg#00006

Subject: Re: Folding mode questions
On Fri, 04 May 2007 18:15:16 -0400, John E. Davis wrote:

>>- The default folding tag in Emacs has a space. E.g., for shell mode, the 
>>folding tag is "# {{{", as oppose to "#{{{". 
> 
> A global_mode_hook can establish a default:

Thanks for the reply, John. 

Sorry, I still can't get it working. 

Here is my .jedrc file:

$ cat ~/.jedrc
% automatically uncompress .gz, .Z, or .bz2 files
auto_compression_mode ();

Fold_Mode_Ok = 1;
define sh_mode_hook ()
{
   mode_set_mode_info ("SH", "fold_info", "# {{{.*\r# }}}\r*/\r*/");
}

define global_mode_hook (mode_hook)
{
   %if (NULL == mode_get_mode_info ("fold_info"))
   %  mode_set_mode_info ("fold_info", " {{{\r }}}\r\r");
   if (mode_hook != "fold_mode_hook")
     folding_mode ();
}

And here is the test file that I used:

$ cat jed.test.sh
# {{{ Functions 1: 

function func(){
}

# }}} 

#{{{ Functions 2: 

function func(){
}

#}}} 

With the above .jedrc file, only the 2nd folding get folded automatically. 

thanks

-- 
Tong (remove underscore(s) to reply)
  http://xpt.sf.net/techdocs/
  http://xpt.sf.net/tools/





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>