GNU bug report logs - #31793
26.1; (error "Lisp nesting exceeds ‘max-lisp-eval-depth’")

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Tue, 12 Jun 2018 02:33:02 UTC

Severity: normal

Tags: fixed

Found in version 26.1

Fixed in version 26.2

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 31793 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: John Shahid <jvshahid <at> gmail.com>
Cc: 31793 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Leo Liu <sdl.web <at> gmail.com>
Subject: Re: bug#31793: 26.1; (error "Lisp nesting exceeds
 ‘max-lisp-eval-depth’")
Date: Wed, 04 Jul 2018 18:38:40 -0400
John Shahid <jvshahid <at> gmail.com> writes:

>> That seems to be a result of converting `global-eldoc-mode' to use
>> `define-globalized-minor-mode' in 2349f. The recursive call seems to be
>> a result of the following sequence of calls:
>>
>> 1. python-mode is enabled which adds an eldoc-mode-hook
>> 2. eldoc-mode is turned on in the buffer triggering python's
>> eldoc-mode-hook
>> 3. python-mode hook will start an inferior process which in turn trigger
>> ,MODE-enable-in-buffers
>> 4. ,MODE-enable-in-buffers will go over the list again trying to enable
>> eldoc-mode
>>
>> The problem is in step 4. The eldoc-global-mode buffer list isn't reset
>> in step 2. Step 4 will try to enabe the mode for the same buffer and
>> start a sequence of calls at 2. I was able to fix this problem by
>> setting the buffer-list to nil inside ,MODE-enable-in-buffers. I
>> attached a patch below.

Looks good to me.  I guess there is some risk since we are modifying a
macro which affects a lot of modes, but when balanced against the "risk"
that we actually fix similar problems in those modes I think this should
go to emacs-26.

> Added the bug number to the changelog entry and attached a new patch.
>
>>From 893e62ee7e3630c981adb3efa39ef409500d7657 Mon Sep 17 00:00:00 2001
> From: John Shahid <jvshahid <at> gmail.com>
> Date: Sat, 23 Jun 2018 11:12:44 -0400
> Subject: [PATCH] Avoid turning on the global-minor-mode recursively
>  (Bug#31793)
>
> * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Reset
>   the buffer-list inside ,MODE-enable-in-buffers to avoid enabling the
>   mode recursively

I would drop that comma from the commit message though, it's not really
part of the variable name, it's only meaningful in the context of a
backquote (and you forgot the period at the end of the sentence).




This bug report was last modified 7 years and 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.