- Subject: Re: [Jed-users-l] Turning off auto-wrap
- From: Parke Bostrom <parke.bostrom@xxxxxxxxx>
- Date: Thu, 5 May 2011 16:14:25 -0700
> Doug Kramer <doog@xxxxxxxxxx> wrote:
>
> > Is there a way to turn off the automatic wrapping of text to the next line
> > if it gets too long?
>
On Thu, May 05, 2011 at 10:02:01PM +0200, Morten Bo Johansen wrote:
> There is the WRAP variable that you could set to a sufficiently high
> number, e.g. in you .jedrc
>
> WRAP = 1000;
>
> I wondered what would be the best method to turn it off completely ...
> in your .jedrc, something like (?)
>
> define text_mode_hook ()
> {
> set_mode (get_mode_name, 0);
> }
>
> which would turn off wrapping when editing files with text_mode.
>
> It would be nice if the WRAP variable turned off wrapping completely if
> set to e.g. -1
>
> WRAP = -1 % turn off wrapping altogether
You could also install a "wrapok_hook" function that returns false, as
per the below.
-Parke
>From (on Ubuntu) /usr/share/jed/doc/txt/hooks.txt:
===========================================================================
Buffer-local Hooks
===========================================================================
Buffer-local hooks are hooks that are defined on a buffer-by-buffer
basis. These hooks are associated with the current buffer via the
function set_buffer_hook'. The syntax for this function is
set_buffer_hook (name_of_hook, &hook_function);
Here name_of_hook is a string that indicates the name of the hook that
is being set. The second argument, hook_function' specifies the
S-Lang function to be associated with the hook. The calling syntax of
the hook function varies with the hook.
The following buffer-local hooks are supported:
[snip]
"wrapok_hook"
This hook may be used to enable automatic wrapping on a
line-by-line basis. Jed will call this hook prior to wrapping a
line, and if it returns a non-zero value, the line will be
wrapped. See lib/slmode.sl for an example of its use.
_______________________________________________
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]