all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: eric@ericabrahamsen.net
Cc: thuna.cing@gmail.com, 72329@debbugs.gnu.org
Subject: bug#72329: Avoid recursion in gnus-message-citation-mode
Date: Sat, 31 Aug 2024 10:56:58 +0300	[thread overview]
Message-ID: <86v7zhcegl.fsf@gnu.org> (raw)
In-Reply-To: <86y14v4nfo.fsf@gnu.org> (message from Eli Zaretskii on Sat, 17 Aug 2024 10:29:31 +0300)

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 <eliz@gnu.org>
> 
> Ping! Eric, any comments?
> 
> > Cc: 72329@debbugs.gnu.org
> > Date: Fri, 02 Aug 2024 10:27:54 +0300
> > From: Eli Zaretskii <eliz@gnu.org>
> > 
> > > From: Thuna <thuna.cing@gmail.com>
> > > 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 (<however-long-before-giving-up>
> > >                  (error "Failed to enable `font-lock-mode'."))
> > >     (while (not font-lock-mode)))
> > >   ...
> > > 
> > > might be preferable.
> > 
> > Thanks.
> > 
> > Eric, any comments or suggestions?
> > 
> > 
> > 
> > 
> 
> 
> 
> 





  reply	other threads:[~2024-08-31  7:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-28  1:30 bug#72329: Avoid recursion in gnus-message-citation-mode Thuna
2024-08-02  7:27 ` Eli Zaretskii
2024-08-17  7:29   ` Eli Zaretskii
2024-08-31  7:56     ` Eli Zaretskii [this message]
2024-09-14  7:33       ` Eli Zaretskii
2024-09-28  8:48         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86v7zhcegl.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=72329@debbugs.gnu.org \
    --cc=eric@ericabrahamsen.net \
    --cc=thuna.cing@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.