unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master f257a0a: * src/xdisp.c: Only check FRAME_RIF for graphical frames
       [not found] ` <20190427033621.4934B206A2@vcs0.savannah.gnu.org>
@ 2019-04-29  1:50   ` Stefan Monnier
  2019-04-29  3:28     ` Alex Gramiak
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2019-04-29  1:50 UTC (permalink / raw)
  To: emacs-devel; +Cc: Alexander Gramiak

> -              if (FRAME_RIF (f)->clear_under_internal_border)
> +              if (FRAME_WINDOW_P (f)
> +                  && FRAME_RIF (f)->clear_under_internal_border)

Wouldn't testing FRAME_RIF(f) instead of FRAME_WINDOW_P(f) make
more sense?  At least, it would not rely on the fact that FRAME_RIF(f)
is supposedly non-NULL when FRAME_WINDOW_P(f) is true.

It'd make the code more "obviously safe".


        Stefan



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Emacs-diffs] master f257a0a: * src/xdisp.c: Only check FRAME_RIF for graphical frames
  2019-04-29  1:50   ` [Emacs-diffs] master f257a0a: * src/xdisp.c: Only check FRAME_RIF for graphical frames Stefan Monnier
@ 2019-04-29  3:28     ` Alex Gramiak
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Gramiak @ 2019-04-29  3:28 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Eli Zaretskii, emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> -              if (FRAME_RIF (f)->clear_under_internal_border)
>> +              if (FRAME_WINDOW_P (f)
>> +                  && FRAME_RIF (f)->clear_under_internal_border)
>
> Wouldn't testing FRAME_RIF(f) instead of FRAME_WINDOW_P(f) make
> more sense?  At least, it would not rely on the fact that FRAME_RIF(f)
> is supposedly non-NULL when FRAME_WINDOW_P(f) is true.
>
> It'd make the code more "obviously safe".

I thought about that, but this way is more consistent with how the other
RIF procedures are called in xdisp.c (surrounded by a FRAME_WINDOW_P
check somewhere up the chain).

I don't have much of a preference, though; Eli, which would you prefer?



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-29  3:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190427033619.18077.55804@vcs0.savannah.gnu.org>
     [not found] ` <20190427033621.4934B206A2@vcs0.savannah.gnu.org>
2019-04-29  1:50   ` [Emacs-diffs] master f257a0a: * src/xdisp.c: Only check FRAME_RIF for graphical frames Stefan Monnier
2019-04-29  3:28     ` Alex Gramiak

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).