From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Strange test in xdisp.c
Date: Tue, 16 Nov 2004 10:35:49 +0100 [thread overview]
Message-ID: <m3hdnqt9u2.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <m1hdnqwhlb.fsf-monnier+emacs@gnu.org> (Stefan's message of "Mon, 15 Nov 2004 23:50:07 -0500")
Stefan <monnier@iro.umontreal.ca> writes:
>> XFASTINT and a test for <= 0 seems a bit odd to me.
>
>> /* If bottom moved off end of frame, change mode line percentage. */
>> if (XFASTINT (w->window_end_pos) <= 0
>> && Z != IT_CHARPOS (it))
>> w-> update_mode_line = Qt;
>
> Hmm... indeed odd. I'd guess that the "== 0" part of "<= 0" is the one used
> and the "< 0" part is basically never activated. I'd hope that if
> window_end_pos had ever been something else than an integer, ENABLE_CHECKING
> would have cought it (I always run with it).
In most places, it is set like this:
w->window_end_pos = make_number (...)
And with USE_LSB_TAG, we have
#define XFASTINT(x) XINT(x)
so I guess ENABLE_CHECKING would not catch it in that case...
All of this XFASTINT stuff seems bogus to me these days as we
move towards USE_LSB_TAG on more platforms...
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
prev parent reply other threads:[~2004-11-16 9:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-16 0:05 Strange test in xdisp.c Kim F. Storm
2004-11-16 4:50 ` Stefan
2004-11-16 9:35 ` Kim F. Storm [this message]
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=m3hdnqt9u2.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--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.