Subject: Re: bug#54240: emacs/lisp/emacs-lisp/derived.el patch

From: Michael Heerdegen <[email-masked]>
Date: Fri, 04 Mar 2022 01:36:44 +0100

Lars Ingebrigtsen <[email-masked]> 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.