GNU bug report logs - #66867
30.0.50; oclosure problem

Previous Next

Package: emacs;

Reported by: Greg Minshall <minshall <at> umich.edu>

Date: Wed, 1 Nov 2023 02:37:01 UTC

Severity: wishlist

Tags: confirmed

Found in version 30.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #30 received at 66867 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Greg Minshall <minshall <at> umich.edu>,
 Michael Heerdegen <michael_heerdegen <at> web.de>, 66867 <at> debbugs.gnu.org
Subject: Re: bug#66867: lexical binding?
Date: Thu, 02 Nov 2023 17:21:23 -0400
>>>> maybe the Oclosure code should enforce lexical-binding, if it can, or
>>>> throw an informative error in the case it can't so enforce?
>>> Stefan M, what do you think?
>> A (cl-assert lexical-binding) in something like `oclosure--lambda`
>> sounds good, yes.
> Thanks, so patches welcome.

Should it go to `emacs-29` or `master`?


        Stefan


diff --git a/lisp/emacs-lisp/oclosure.el b/lisp/emacs-lisp/oclosure.el
index ae0038b45e6..c23dd5a36da 100644
--- a/lisp/emacs-lisp/oclosure.el
+++ b/lisp/emacs-lisp/oclosure.el
@@ -350,6 +350,7 @@ oclosure--lambda
 should be mutable.
 No checking is performed."
   (declare (indent 3) (debug (sexp (&rest (sexp form)) sexp def-body)))
+  (cl-assert lexical-binding)          ;Can't work in dynbind dialect.
   ;; FIXME: Fundamentally `oclosure-lambda' should be a special form.
   ;; We define it here as a macro which expands to something that
   ;; looks like "normal code" in order to avoid backward compatibility





This bug report was last modified 1 year and 198 days ago.

Previous Next


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