* Strange test in xdisp.c
@ 2004-11-16 0:05 Kim F. Storm
2004-11-16 4:50 ` Stefan
0 siblings, 1 reply; 3+ messages in thread
From: Kim F. Storm @ 2004-11-16 0:05 UTC (permalink / raw)
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;
--
Kim F. Storm http://www.cua.dk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Strange test in xdisp.c
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
0 siblings, 1 reply; 3+ messages in thread
From: Stefan @ 2004-11-16 4:50 UTC (permalink / raw)
Cc: emacs-devel
> 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).
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Strange test in xdisp.c
2004-11-16 4:50 ` Stefan
@ 2004-11-16 9:35 ` Kim F. Storm
0 siblings, 0 replies; 3+ messages in thread
From: Kim F. Storm @ 2004-11-16 9:35 UTC (permalink / raw)
Cc: emacs-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-16 9:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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.