- Subject: wrap_hook Was: jed snapshots available through svn
- From: Dave Kuhlman <dkuhlman@xxxxxxxxxxxxxxx>
- Date: Wed, 15 Feb 2006 11:18:27 -0800
On Mon, Feb 13, 2006 at 01:09:28PM -0500, John E. Davis wrote:
> This weekend I made arragements with gna.org to host jed's subversion
> repository. This means that if you have subversion installed, you can
> grab the latest snapshot of the sourcecode using svn. For more
> information, see <http://www.jedsoft.org/jed/svn.html>.
>
Thank you, once again, John.
Yesterday, I retrieved and build jed from SVN. It looks good.
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.
Has the defined behavior for wrap_hook changed? Do I need to add
something to my wrap_hook? Or, is some patch needed in the jed
source? The relavent code seems to be in function ins_char_cmd()
in src/cmds.c.
I can patch my text_mode_wrap_hook function by adding the following
at the end:
if (action == 0)
{
indent_line();
}
But, it could also be fixed with the following patch in
src/cmds.c, which basically sets a few lines of code back to what
they were in the previous version:
$ diff -u src/cmds_old.c src/cmds.c
--- src/cmds_old.c 2006-02-14 16:15:40.000000000 -0800
+++ src/cmds.c 2006-02-15 10:49:49.000000000 -0800
@@ -482,10 +482,10 @@
newline ();
}
- if ((CBuf->buffer_hooks != NULL)
- && (CBuf->buffer_hooks->wrap_hook != NULL))
- SLexecute_function(CBuf->buffer_hooks->wrap_hook);
- else if (Indented_Text_Mode) indent_line ();
+ if (Indented_Text_Mode) indent_line ();
+ if ((CBuf->buffer_hooks != NULL)
+ && (CBuf->buffer_hooks->wrap_hook != NULL))
+ SLexecute_function(CBuf->buffer_hooks->wrap_hook);
return(1);
}
Needless to say, these lines were changed for some reason. So,
the above patch is likely not good. Therefore, I'm not sure which
fix, if either, is the correct one.
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]