all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: xdisp.c's struct it questions.
Date: Sat, 03 Oct 2015 19:09:09 +0300	[thread overview]
Message-ID: <83r3lc2au2.fsf@gnu.org> (raw)
In-Reply-To: <20151003154835.GA4509@acm.fritz.box>

> Date: Sat, 3 Oct 2015 15:48:36 +0000
> From: Alan Mackenzie <acm@muc.de>
> 
> 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".



  parent reply	other threads:[~2015-10-03 16:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03 15:48 xdisp.c's struct it questions Alan Mackenzie
2015-10-03 16:06 ` Andreas Schwab
2015-10-03 16:09 ` Eli Zaretskii [this message]
2015-10-03 16:38   ` Alan Mackenzie
2015-10-03 16:59     ` Eli Zaretskii
2015-10-04 13:44   ` Alan Mackenzie
2015-10-04 17:04     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r3lc2au2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.