- Subject: Re: [Jed-users-l] Stripping line endings
- From: Morten Bo Johansen <mbj@xxxxxxxxxxx>
- Date: Wed, 12 Jan 2011 18:23:39 +0100
Manfred Hanke <Manfred.Hanke@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> define strip_line_endings(buf)
> {
> push_spot();
> bob();
> while(re_fsearch(`[ \t]+$`) > 0)
> replace_match("", 1);
> pop_spot();
> }
> add_to_hooks("_jed_save_buffer_before_hooks", &strip_line_endings);
This would do it for all files, so the last line should be in a mode
hook:
define python_mode_hook ()
{
add_to_hook ("_jed_save_buffer_before_hooks", &strip_line_endings);
}
Morten
_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l
[2011 date index]
[2011 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]