jed-users mailing list

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

mark deleted when using narrow()/widen()?


Howdy

I am trying to use an update_hook to perform some processing on highlighted regions. The code I've come up with looks as follows

define f()
{
   if (markp() != 0)
    {
       narrow();

       % ...

       widen();
    }

}

set_buffer_hook("update_hook", "f");

My problem is that the moment narrow() is called the selection terminates: the mark is no longer set (adding an else clause to the markp() test above that prints a simple message shows that it is so - I think).

What am I missing? Is this (ie, using an update_hook) even the right approach to perform simple actions on text being selected?

Thanks in advance for any help

Mack

----

Mack Stevenson
mackstevenson@xxxxxxxxxxx

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


--------------------------
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]