GNU bug report logs - #25965
26.0.50; iter-lambda may evaluate certain forms twice

Previous Next

Package: emacs;

Reported by: Andreas Politz <politza <at> hochschule-trier.de>

Date: Sat, 4 Mar 2017 08:04:01 UTC

Severity: normal

Tags: patch

Found in version 26.0.50

Done: Gemini Lasswell <gazally <at> runbox.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Colascione <dancol <at> dancol.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 25965 <at> debbugs.gnu.org, Andreas Politz <politza <at> hochschule-trier.de>
Subject: bug#25965: 26.0.50; iter-lambda may evaluate certain forms twice
Date: Wed, 08 Mar 2017 14:08:07 -0800
On Wed, Mar 08 2017, Stefan Monnier wrote:
>> The unwind-protect form is created in this function.
>>
>> #+BEGIN_SRC emacs-lisp
>>   (defun cps--make-dynamic-binding-wrapper (dynamic-var static-var)
>>     (cl-assert lexical-binding)
>>     (lambda (form)
>>       `(let ((,dynamic-var ,static-var))
>>          (unwind-protect ; Update the static shadow after evaluation is done
>>               ,form
>>            (setf ,static-var ,dynamic-var))
>>          ,form)))
>> #+END_SRC
>>
>> And it seems to me that the second occurrence of ,form is just an
>> error.
>
> Hmm... indeed that looks odd, and maybe just removing the second ,form
> is the right fix.  Daniel, do you happen to remember what the second
> ,form above is meant to do?

Embarrass me years later? :-) I think it's safe to remove it. Let's make
sure to add a test too.




This bug report was last modified 7 years and 229 days ago.

Previous Next


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