emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xdisp.c's struct it questions.


From: Eli Zaretskii
Subject: Re: xdisp.c's struct it questions.
Date: Sat, 03 Oct 2015 19:09:09 +0300

> Date: Sat, 3 Oct 2015 15:48:36 +0000
> From: Alan Mackenzie <address@hidden>
> 
> I'm trying to get some stuff in xdisp.c working.  It's hard.

My sympathies.  Please consider recording in the comments everything
you learn that isn't already there.  Let's take something positive and
useful from your ordeal ;-)

> I'm currently looking at routines like `move_it_to', which is described
> as "Move IT forward until it satisfies one or more of the criteria in
> TO_CHARPOS, TO_X, TO_Y, and TO_VPOS."
> 
> What I can't find anywhere is a description of what it means for a
> "struct it" to _be_ somewhere.  There are around 100 fields in struct
> it, and several of them record locations, coordinates, etc., in one way
> and another.  Which of these fields are changed when move_it_to is
> called?

It depends on the criteria.  For TO_CHARPOS, the goal value is in
it->pos.charpos; for TO_X, it's in it->current_x; for TO_Y, it's in
it->current_y; and for TO_VPOS, it's in it->vpos.

Also note that the criteria is actually tested to "reach or exceed"
the goal values, i.e. do not expect to always get an exact equality,
only "greater or equal".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]