- Subject: Re: wrap_hook Was: jed snapshots available through svn
- From: Dave Kuhlman <dkuhlman@xxxxxxxxxxxxxxx>
- Date: Thu, 16 Feb 2006 08:56:56 -0800
On Wed, Feb 15, 2006 at 10:41:25PM -0500, John E. Davis wrote:
> Dave Kuhlman <dkuhlman@xxxxxxxxxxxxxxx> wrote:
> >But, I hit one small difference. In text-mode, I use a wrap_hook
> >*and* I have ``WRAP_INDENTS = 1;`` in my .jedrc. But, automatic
> >line indents no longer happen as before. My wrap_hook, by the
> >way, is based on the text_mode_wrap_hook example in
> >doc/txt/hooks.txt.
>
> I made the change when I added the "wrapok_hook" and then made changes
> to slang_mode to take advantage of this new feature. I felt that if a
> "wrap_hook" was defined for a buffer, then that hook should handle the
> indentation. That is primarily what the hook would be used for
> anyway. However, I can see that a couple of the wrap_hooks relied
> upon the old behavior, so tonight I checked in new versions of
> texcom.sl and tmmode.sl to correct this.
>
John -
Good. So, I'll keep the indent_line() in my text_mode_wrap_hook.
By the way, don't forget the sample text_mode_wrap_hook in
doc/txt/hooks.txt. You will want to add something like the
following, if you have not done so already::
if (WRAP_INDENTS and (action == 0))
{
indent_line();
}
where `action` indicates whether the wrap_hook handled the
wrapping or wants normal indenting to be done.
Thanks again.
Dave
--
Dave Kuhlman
http://www.rexx.com/~dkuhlman
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2006 date index]
[2006 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]