From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#47832: 28.0.50; define-fringe-bitmap and emacs --daemon Date: Tue, 25 May 2021 14:55:25 +0300 Message-ID: <83eedvc9jm.fsf@gnu.org> References: <7dee3f4235cf450a3254@heytings.org> <83mttxwgm8.fsf@gnu.org> <1869622e16688e6aedec@heytings.org> <83h7k5w54l.fsf@gnu.org> <83fszpw40t.fsf@gnu.org> <1869622e16c60dc2ce0d@heytings.org> <83eef9w0xd.fsf@gnu.org> <1869622e16270efbc7e8@heytings.org> <87im3778ao.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15199"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gregory@heytings.org, 47832@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 25 13:56:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llVfQ-0003ki-1H for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 May 2021 13:56:12 +0200 Original-Received: from localhost ([::1]:53740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llVfP-0003m8-20 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 May 2021 07:56:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llVfH-0003kI-Ea for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 07:56:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llVfG-0005fY-1y for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 07:56:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1llVfG-0001qu-14 for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 07:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 May 2021 11:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed patch Original-Received: via spool by 47832-submit@debbugs.gnu.org id=B47832.16219437407080 (code B ref 47832); Tue, 25 May 2021 11:56:01 +0000 Original-Received: (at 47832) by debbugs.gnu.org; 25 May 2021 11:55:40 +0000 Original-Received: from localhost ([127.0.0.1]:44872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llVet-0001q7-Lf for submit@debbugs.gnu.org; Tue, 25 May 2021 07:55:39 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llVes-0001pw-Dc for 47832@debbugs.gnu.org; Tue, 25 May 2021 07:55:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42198) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llVem-0005R9-LF; Tue, 25 May 2021 07:55:32 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2450 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llVeh-0006dU-58; Tue, 25 May 2021 07:55:32 -0400 In-Reply-To: <87im3778ao.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 25 May 2021 06:21:19 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207196 Archived-At: > From: Lars Ingebrigtsen > Cc: Eli Zaretskii , 47832@debbugs.gnu.org > Date: Tue, 25 May 2021 06:21:19 +0200 > > Gregory Heytings 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?