- Subject: Re: Folding mode questions
- From: - Tong - <mlist4suntong@xxxxxxxxx>
- Date: Fri, 4 May 2007 23:13:00 +0000 (UTC)
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/
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2007 date index]
[2007 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]