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#72329: Avoid recursion in gnus-message-citation-mode Date: Sat, 31 Aug 2024 10:56:58 +0300 Message-ID: <86v7zhcegl.fsf@gnu.org> References: <877cd62thb.fsf@gmail.com> <86y15fv0xx.fsf@gnu.org> <86y14v4nfo.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36007"; mail-complaints-to="usenet@ciao.gmane.io" Cc: thuna.cing@gmail.com, 72329@debbugs.gnu.org To: eric@ericabrahamsen.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 31 09:58:34 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 1skJ0D-0009H6-Eo for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 31 Aug 2024 09:58:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1skIzx-0000WH-09; Sat, 31 Aug 2024 03:58:18 -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 1skIzm-0000Sr-4Y for bug-gnu-emacs@gnu.org; Sat, 31 Aug 2024 03:58:08 -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 1skIzk-0004qG-UK for bug-gnu-emacs@gnu.org; Sat, 31 Aug 2024 03:58:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=oFezNXNpNFLKVSlmgh+V9A0FcOuaKvhdZIkH+3tmueE=; b=kJ8bbbAMC55qOCoJlj9z9/7pR8Wp55a8QsFjhB7dKrFfWgdvIgpkwbwuTbqg3PK1Zo4eFf7P6dmkmA0/oEz8CbvgmkECEBqCDdODwKBTILv7/7vtZvTekzO155vnA1aVsjhvI00V+1EIaYZuKBihBr1rp7U6yqppWzUEcEqoZsjjNIl6SJPPjyuZhCtpzRvc6hgjIy3W+0SUAQ/GpGAV2fpIBgXYaG0e4zk2X5Lc5GlAZZvoTSRbNJLtd7LkwyNqeV2uOGX/OX5dAYav7Fb8HivWS5DcoItyNMA8DSRBW6Sw6U07xq07l8UVUhn2hXvpw6yEaLWQJ0eiQfkSlLBelg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1skJ0g-00067V-Mx for bug-gnu-emacs@gnu.org; Sat, 31 Aug 2024 03:59: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: Sat, 31 Aug 2024 07:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72329 X-GNU-PR-Package: emacs Original-Received: via spool by 72329-submit@debbugs.gnu.org id=B72329.172509109523425 (code B ref 72329); Sat, 31 Aug 2024 07:59:02 +0000 Original-Received: (at 72329) by debbugs.gnu.org; 31 Aug 2024 07:58:15 +0000 Original-Received: from localhost ([127.0.0.1]:53833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1skIzu-00065j-MI for submit@debbugs.gnu.org; Sat, 31 Aug 2024 03:58:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1skIzt-00065R-1Y for 72329@debbugs.gnu.org; Sat, 31 Aug 2024 03:58:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1skIyr-0004UL-5e; Sat, 31 Aug 2024 03:57:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=oFezNXNpNFLKVSlmgh+V9A0FcOuaKvhdZIkH+3tmueE=; b=HMT3bGnFY5Nb CTOnhqFvFVlhpeATXgI32N4iWNb4YY1so3r++8KEPuKy9nPvKW56oHc3XVsAqbsL39ViqI5NWqfH1 mOVPPpyC2rx9kiSnI+O5s+iTJQs41pw77rexNpSx9oUTEYA5LW6Q2bgbkAnuCTIojrRjtkgZDw/8Q WUz1cH3mp94cDqcAq2pZAH/yn4KJ247P3Ei8hBml2jSqKUyLlCSk2iKizFycfvAk1GG0zvJYjnhFe gaH5HXi24SYzhA194PiLqwyr/Y7QBCiWOvSstDHOCmlf62NFeRCnuS6JfjuqpYyArIgcTu7Qn8MtM d+laF9Q3PM+6YOwJScLO8w==; In-Reply-To: <86y14v4nfo.fsf@gnu.org> (message from Eli Zaretskii on Sat, 17 Aug 2024 10:29:31 +0300) 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:290978 Archived-At: Ping! Ping! Eric, any comments? > Cc: 72329@debbugs.gnu.org, thuna.cing@gmail.com > Date: Sat, 17 Aug 2024 10:29:31 +0300 > From: Eli Zaretskii > > Ping! Eric, any comments? > > > Cc: 72329@debbugs.gnu.org > > Date: Fri, 02 Aug 2024 10:27:54 +0300 > > From: Eli Zaretskii > > > > > From: Thuna > > > Date: Sun, 28 Jul 2024 03:30:40 +0200 > > > > > > 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. > > > > Thanks. > > > > Eric, any comments or suggestions? > > > > > > > > > > > >