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, 17 Aug 2024 10:29:31 +0300 Message-ID: <86y14v4nfo.fsf@gnu.org> References: <877cd62thb.fsf@gmail.com> <86y15fv0xx.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27013"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72329@debbugs.gnu.org, thuna.cing@gmail.com To: eric@ericabrahamsen.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 17 09:30:58 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 1sfDtq-0006rH-AF for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Aug 2024 09:30:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sfDtP-0007v5-Aa; Sat, 17 Aug 2024 03:30:33 -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 1sfDtH-0007uV-KM for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 03:30:25 -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 1sfDtH-00059a-7d for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 03:30:23 -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=3sk64Ubojr6Fixmn1Z98MTfWzkKoYczp7X+S0qODAUI=; b=alpZjls94lXOsqy/dDS7n5SF9QvKvzXjS9KWX4Tpzer9ku5HLiEy1PuddWZ17oopRFolgvPZrEzBlw/Kiw1p42V6kRNjYJfySmiZqhp2zuwSY5c8Ms9ENxf0QeijyQpPgL+SnxiLgmB4/LMLyPWw1jR8jqWfsat/5XyZ4ZKcvXQJGYtXVsA5XbNxZjhUin4Nov52X0Vq9YHsr+umTZn6Ve3M4lxSwRbmVnLAIn/b13fcPP7sZGJz3iZPuAGP0egrJtcP6WV3A3NaTZl7mgvi5x0F1oqYz/EHrt3rRBYhFo+kx4j8x/y71mLjGrrCAvRWs7/27ke1Cs46qy2gyf0+qw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sfDtt-0007lO-OG for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 03:31:01 -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, 17 Aug 2024 07:31:01 +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.172387982029779 (code B ref 72329); Sat, 17 Aug 2024 07:31:01 +0000 Original-Received: (at 72329) by debbugs.gnu.org; 17 Aug 2024 07:30:20 +0000 Original-Received: from localhost ([127.0.0.1]:53316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfDtD-0007kE-Sa for submit@debbugs.gnu.org; Sat, 17 Aug 2024 03:30:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfDtC-0007k0-AP for 72329@debbugs.gnu.org; Sat, 17 Aug 2024 03:30:18 -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 1sfDsU-0004t9-0k; Sat, 17 Aug 2024 03:29:34 -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=3sk64Ubojr6Fixmn1Z98MTfWzkKoYczp7X+S0qODAUI=; b=JBC94u0InM69 B432OAG5lmIrIhMpdvoDnqIcKPhCVnFqfCVUylQerFj7Va4lybRqZjy7mhiEOtNyqKxq/xlFv8ma+ zqvEGr3WhyJFGHAdw6s0vaa89jFk8o26I4jZx/pyMMT/N2+6/9ZsFpO7pjlEbzpWPAhDXIr87xJWm bypQoNIak1V0wA3pm9tuXcOqDy5JWh70bUxXji3DFy4YiiQi5wxH4fU27vuCtkYlO3pma2wTH5OOt L6M2y64T0TZoFrZwK+23A1JdeaKuDciIspt5YZS6SDhsiQ0FCmGpalOFScJzQNfC/WlIwD+eQ5QoZ MUn2rSEjPY2rniQEC9ZhlA==; In-Reply-To: <86y15fv0xx.fsf@gnu.org> (message from Eli Zaretskii on Fri, 02 Aug 2024 10:27:54 +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:290220 Archived-At: 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? > > > >