GNU bug report logs - #47832
28.0.50; define-fringe-bitmap and emacs --daemon

Previous Next

Package: emacs;

Reported by: Gregory Heytings <gregory <at> heytings.org>

Date: Fri, 16 Apr 2021 22:23:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gregory Heytings <gregory <at> heytings.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 47832 <at> debbugs.gnu.org
Subject: bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon
Date: Tue, 25 May 2021 12:44:34 +0000
>> diff --git a/src/fringe.c b/src/fringe.c
>> index 65c9a84..47615f5 100644
>> --- a/src/fringe.c
>> +++ b/src/fringe.c
>> @@ -1776,14 +1776,15 @@ gui_init_fringe (struct redisplay_interface *rif)
>>    for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++)
>>      {
>>        struct fringe_bitmap *fb = &standard_bitmaps[bt];
>> -      rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width);
>> +      if (!fringe_bitmaps[bt])
>> +        rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width);
>>      }
>>
>>    /* Set up user-defined fringe bitmaps that might have been defined
>>       before the frame of this kind was initialized.  This can happen
>>       if Emacs is started as a daemon and the init files define fringe
>>       bitmaps.  */
>> -  for ( ; bt < max_used_fringe_bitmap; bt++)
>> +  for (bt = NO_FRINGE_BITMAP + 1; bt < max_used_fringe_bitmap; bt++)
>>      {
>>        struct fringe_bitmap *fb = fringe_bitmaps[bt];
>>        if (fb)
>
> Why does the second for-loop go again over the bitmaps that the first 
> one already processed?  Or what am I missing?
>

Each loop processes its "own" bitmaps.  In the first loop 
define_fringe_bitmap is called only if (!fringe_bitmaps[bt]), in the 
second loop it is called only if (fringe_bitmaps[bt]).  IOW, the first 
loop processes the standard bitmaps that are not overridden by 
user-defined bitmaps, and the second loop processes user-defined bitmaps.




This bug report was last modified 3 years and 362 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.