From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thuna Newsgroups: gmane.emacs.bugs Subject: bug#72329: Avoid recursion in gnus-message-citation-mode Date: Sun, 28 Jul 2024 03:30:40 +0200 Message-ID: <877cd62thb.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15120"; mail-complaints-to="usenet@ciao.gmane.io" To: 72329@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 28 03:32:22 2024 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 1sXslq-0003mR-Gy for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Jul 2024 03:32:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sXslN-0007uu-Qt; Sat, 27 Jul 2024 21:31:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sXslL-0007uZ-Pk for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 21:31:51 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sXslL-0002sS-Gt for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 21:31:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=4TEat0lhwkoi6QOGe2ENrC8gw7ZQhrlQzx06nHpFuUw=; b=o8yIVWBgiGomkHJF7XmjqsR/c8Gci7fucS0z3vuPr0eUYXnCQ8ZpTUwZzCjr5ken/oUitj605xiKNGDMvmkxXIvReMp6zFEVWCsrFY2gTu+HfcHQnJO4MMHq0qrrtP/ohVAItILXKqc9xy1IpZwfADRDf2UVoCb3gsxYhxmUeRuV1763XHkRDt4uOH/7hNdiZby1Su5ErfQ3PkZWIk6/P6yCMpCPqtVU6FCNpAceIjgL/476vfBkqLZ9DnJ35T84eX/XQAKGbW243jLsd1Ov96r3pWLa0IRrBChnyi0fEE3GAb8VHbzdGxp6G1fHYNSPzKFDyUxZuhrBWbaZUl13dw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sXslV-0007Aa-Qd for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 21:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thuna Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jul 2024 01:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72329 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172213031227529 (code B ref -1); Sun, 28 Jul 2024 01:32:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jul 2024 01:31:52 +0000 Original-Received: from localhost ([127.0.0.1]:42538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXslM-00079x-5d for submit@debbugs.gnu.org; Sat, 27 Jul 2024 21:31:52 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:60600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sXslK-00079m-Dn for submit@debbugs.gnu.org; Sat, 27 Jul 2024 21:31:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sXsl9-0007tY-3y for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 21:31:39 -0400 Original-Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sXsl6-0002ps-Ao for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2024 21:31:38 -0400 Original-Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2ef2d7d8854so30370301fa.0 for ; Sat, 27 Jul 2024 18:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722130294; x=1722735094; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=4TEat0lhwkoi6QOGe2ENrC8gw7ZQhrlQzx06nHpFuUw=; b=Pwrbhm9ieXfpmVRAcYQrPwcVconfH8KY5JRg8cejo/5ccEsMPwwY+h9BlWP4hMzlWA 2yMuBfMhZ374Ft1IHdypiJQH++jaTTF9w9AM8KZ6rjPeqX8TEX872XtC/HcjxT01nJ/T wD8qqjOOxYpbwDP+w8LPdNNWMRO4o8Ir6GKuTDRXispWonoa9hncYQbarcW+tZgBYpAm L0vQMcILOsjNstVDfapd5vmIZdjj6Zkiw3X2AZri5mjRS90OjhFRZNcjP1P1+m6fgtj+ kURw7k2Y9AfaheY4rLN4viXhUjV4XQwHcqz68TIIHUgigGLnFVY+Hwo087gtKQ4cA7+R Gb8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722130294; x=1722735094; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=4TEat0lhwkoi6QOGe2ENrC8gw7ZQhrlQzx06nHpFuUw=; b=d+ST6kO/hSmhjL06WVRKCj9WLIM5y7tpY3UcyU2AQMd8d8kEN45bnMV1scVM0nUa04 XeZRLu8qXNHb9LV01Yq/jdC4R3Qn/L1ULegcAk/XZnSr8XpK1tDgrqj8Ezv+4S+ZyFkU N5VSkmf5xiuIYRlir1IAOgukA01we0kVLTS09aU8lHj+ITe4UKOK+qbnhEPZ8f2PzqJe YAez1bJGtTcAyuVneNnfO5/c2gqsq/taUHqhnAlH1JoU1yizPQuQI8hTPjRRHRBw1QUJ ZJ0+M6K5ZUvuWAjF6MEW1qAqnHmQw4nYf47sIqrVHScTvv+B5d5bFU/5A+jK1EAAeRlW imMQ== X-Gm-Message-State: AOJu0Yy43CfLrIP7ADS+qXUQLUvW0Gtg96dy4g8/ZRy3qnWGzA6tIjru 2wteFGyKO1oU92Yne9eNNwbybVkXvhQTUYRb5EuVTWCIkWCJtLHFlv/SnQ== X-Google-Smtp-Source: AGHT+IED6G9ADfxAYEQzU+vjQNPRIpx1UJ6bXT7bCgD6NpW8KUtM5BzOSX16byupY2P23+R6PdNMXg== X-Received: by 2002:a2e:818b:0:b0:2ef:2d13:b1a with SMTP id 38308e7fff4ca-2f12ee1bdcfmr25708471fa.33.1722130293846; Sat, 27 Jul 2024 18:31:33 -0700 (PDT) Original-Received: from thuna-lis3 ([85.106.105.81]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac64eb3591sm3647190a12.67.2024.07.27.18.31.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jul 2024 18:31:33 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=thuna.cing@gmail.com; helo=mail-lj1-x236.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289450 Archived-At: In `gnus-message-citation-mode' the (if (not font-lock-mode) (gnus-message-citation-mode (font-lock-mode 1)) ...) can lead to excessive nesting if font-lock-mode fails to be set (quick enough or altogether). Changing this with (while (not font-lock-mode) (font-lock-mode 1)) ... should be better, assuming it is necessary for `font-lock-mode' to be called repeatedly, otherwise (font-lock-mode 1) (while (not font-lock-mode)) ... might also work, or simply (font-lock-mode 1) ... if it is not necessary to wait. One possible problem with these arrangements is that it may be desirable to error in case there is an issue which prevents font-lock-mode from being set perpetually, in which case something like (font-lock-mode 1) (with-timeout ( (error "Failed to enable `font-lock-mode'.")) (while (not font-lock-mode))) ... might be preferable.