GNU bug report logs - #54240
emacs/lisp/emacs-lisp/derived.el patch

Previous Next

Package: emacs;

Reported by: chenphy10 <at> gmail.com

Date: Thu, 3 Mar 2022 17:10:02 UTC

Severity: normal

Tags: moreinfo

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 54240 <at> debbugs.gnu.org, chenphy10 <at> gmail.com
Subject: Re: bug#54240: emacs/lisp/emacs-lisp/derived.el patch
Date: Fri, 04 Mar 2022 16:19:59 +0100
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> To me this looks like a regression introduced when converting to lexical
> binding.  Look at the symbol 'mode': it's implicitly quoted so it can't
> refer to the lexical variable and you get the error reported.

Oh, yeah -- I was thinking that the mode had to be lexically bound
there, but of course it isn't really, since eval is ... eval.  (Whenever
there's an eval in code, there's a bug somewhere.)

Would adding LEXICAL to the eval form fix the issue here, or would that
interact oddly with the defvar?

> The patch unquotes too much however, looks like we want something like
>
>> > - (define-abbrev-table (derived-mode-abbrev-table-name mode) nil)
>> > + (define-abbrev-table (derived-mode-abbrev-table-name ',mode) nil)
>
> (does that work?)

Tongjie Chen <chenphy10 <at> gmail.com> writes:

> Thanks Michael. I tested this improved quoting and it worked. Once the abbrev
> table is defined, jdee will no longer run into problems. 

OK, I'll push Michael's change to emacs-28, because this is a regression
from Emacs 27.2, I think.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 77 days ago.

Previous Next


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