jed-users mailing list

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

Re: Odd problem with regions


John Skilleter <john@xxxxxxxxxxxxxxxx> wrote:
>I have a problem where the code will sometimes behave as if it is acting on
>a region when one _isn't_ obviously defined and no region is visible. I've

  If you see an "m" as the 4th character on the status line, then the
mark stack is not empty and a region exists.   The text between the
top mark on the mark stack and the cursor will get highlighted as long
as the mark has its visible attribute set.

[...]
>My question: What are invisible marks, and how do they get defined (and
>why).

  A mark that does not have the visible attribute is one that is
generated by "push_mark".  The "push_visible_mark" and "set_mark_cmd"
functions push a mark with the visible attribute.

>Also, in the s-lang files in the lib directory, markp() is used far more
>often than is_visible_mark() and often in a context where I would have
>thought that is_visible_mark() should be used instead (unless I'm wrong
>about what my code is doing) - so, my bonus question: Are many of these
>uses of markp() wrong as well, or am I just confused?

  If a function is specified to operate on a region (text between the
top mark and the current position), then it should work on the region
no matter how the region or the mark was created.  For this reason,
markp is most often the appropriate choice.

I hope this explanation helps a bit.
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>.


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