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


View this message in rfc822 format

From: Tongjie Chen <chenphy10 <at> gmail.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 54240 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: bug#54240: emacs/lisp/emacs-lisp/derived.el patch
Date: Thu, 3 Mar 2022 22:28:23 -0500
[Message part 1 (text/plain, inline)]
Thanks Michael. I tested this improved quoting and it worked. Once the
abbrev table is defined, jdee will no longer run into problems.

A strange thing is when eval the previous non patched defun, jdee will
work. Wonder if "mode" was leaked somewhere.

On Thu, Mar 3, 2022 at 7:36 PM Michael Heerdegen <michael_heerdegen <at> web.de>
wrote:

> 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.
>


-- 
Best,
Tongjie
[Message part 2 (text/html, inline)]

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.