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 #16 received at 54240 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
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 01:36:44 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> > - (define-abbrev-table (derived-mode-abbrev-table-name mode) nil)
> > + ,(define-abbrev-table (derived-mode-abbrev-table-name mode) nil)
>
> The code looks correct the way it is, I think?

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.

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?)

Michael.




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.