jed-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: identifying readonly lines; filtering inserted text


Hi,

> readonly? My goal is to run a slang function each time the user
> tries to modify a readonly line.

I also have a need for something similar; a patch against jed
B0.99-17.135 is attached. Just apply it with

$ patch -p0 <readonly.patch

What it does:

* is_readonly_line()

* line_readonly_error_hook: modeled on bob_eob_error_hook with the
difference that jed only prints the default Line_Read_Only_Error
message if no function is installed for this hook.

* minor cosmetics: print Line_Read_Only_Error message rather than
"This line is read-only" on line 232 of src/ins.c.

This is my first time playing around with jed internals, so please
someone have a look. John: if you find this any good, is there a
chance of getting this hook into jed? At least two of us would have
good use for it. : )

Cheers,

Manuel

Attachment: readonly.patch
Description: Binary data


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]