- Subject: Re: identifying readonly lines; filtering inserted text
 
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
 
- Date: Sun, 20 Nov 2005 12:36:46 -0500
 
Marvin Lyndon <marvin.lyndon@xxxxxxxxxxx> wrote:
>readonly by calling set_line_readonly(1); is there a way to detect attempts 
>to modify a line which is marked as readonly? My goal is to run a slang 
>function each time the user tries to modify a readonly line.
>I have noticed that a Runtime Error exception is emitted when I try to do 
>so; but is there a way for me to install a handler/"catch" statement for 
>those exceptions? Even if I succeed in doing so, how do I know that the
Not currently.  What you are asking for is something similar to the
"bob_eob_error_hook", which is called on "beginning/end of buffer"
errors (See the documentation for "set_buffer_hook").
>Runtime Error exception was generated by an attempt to write to a readonly 
>line? (No function equivalent to is_line_hidden() seems to exist...) I 
>thought it would be trivial to use update_hook for this, but it only calls 
>functions *after* the text insertion attempt has happened and so doesn't 
>give me a chance to detect it.
Currently, if an attempt is made to modify a read-only line, the
editor will issues a message indicating that the line is read-only.
What would your hook do?
Thanks,
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
  [2005 date index]
  [2005 thread index]
  
  [Thread Prev] [Thread Next]
      
  [Date Prev] [Date Next]