GNU bug report logs - #29334
25.3; compiled commands don't respect special interactive expressions

Previous Next

Package: emacs;

Reported by: Allen Li <vianchielfaura <at> gmail.com>

Date: Fri, 17 Nov 2017 06:18:02 UTC

Severity: normal

Tags: confirmed

Found in versions 24.4, 25.3

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 29334 <at> debbugs.gnu.org, rgm <at> gnu.org, vianchielfaura <at> gmail.com
Subject: bug#29334: 25.3; compiled commands don't respect special interactive expressions
Date: Fri, 24 Nov 2017 09:58:29 +0200
> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
> Date: Thu, 23 Nov 2017 22:11:23 -0500
> Cc: 29334 <at> debbugs.gnu.org, Allen Li <vianchielfaura <at> gmail.com>
> 
> > Bisected to a46481370, our old friend "Use lexical-binding".
> 
> How about this:
> 
> >From a8b43e98c592c84957ea304a0dc2d6423af9c5c5 Mon Sep 17 00:00:00 2001
> From: Noam Postavsky <npostavs <at> gmail.com>
> Date: Thu, 23 Nov 2017 21:57:09 -0500
> Subject: [PATCH] Fix command repetition with lexical-binding (Bug#29334)
> 
> `call-interactively' relies on analyzing the source of `interactive'
> forms in order to preserve arguments like (region-end) in the command
> history, rather than just storing the resulting position.  However,
> the byte-compiler does not preserve the source of the interactive form
> when lexical-binding is in effect, because `call-interactively' would
> evaluate the form with dynamic binding in that case.
> 
> To fix this, change `call-interactively' so that it checks compiled
> functions for lexical-binding as well.  Then the byte-compiler can
> preserve the source of interactive forms regardless of the value of
> lexical-binding.

Thanks.  If no objections are voiced to this approach, please push it
to the master branch.  I think this is too radical for the release
branch.

P.S. Should this change be reflected in the ELisp manual somehow?




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

Previous Next


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