[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon
From: |
Eli Zaretskii |
Subject: |
bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon |
Date: |
Tue, 25 May 2021 14:55:25 +0300 |
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, 47832@debbugs.gnu.org
> Date: Tue, 25 May 2021 06:21:19 +0200
>
> Gregory Heytings <gregory@heytings.org> writes:
>
> > Okay, the patch was meant only to fix the bug, but indeed the small
> > optimization you mention makes sense. Updated patch attached.
>
> Thanks; applied to Emacs 28.
Bother:
> 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?
- bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon, Lars Ingebrigtsen, 2021/05/25
- bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon,
Eli Zaretskii <=
- bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon, Gregory Heytings, 2021/05/25
- bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon, Eli Zaretskii, 2021/05/25
- bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon, Gregory Heytings, 2021/05/25
- bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon, Eli Zaretskii, 2021/05/25
- bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon, Gregory Heytings, 2021/05/25
- bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon, Eli Zaretskii, 2021/05/25
- bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon, Eli Zaretskii, 2021/05/26
- bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon, Gregory Heytings, 2021/05/27
- bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon, Eli Zaretskii, 2021/05/27