emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/with-simulated-input 0d5e910f19 061/134: Add an error mess


From: ELPA Syncer
Subject: [nongnu] elpa/with-simulated-input 0d5e910f19 061/134: Add an error message for unhandled case
Date: Mon, 10 Jan 2022 23:00:05 -0500 (EST)

branch: elpa/with-simulated-input
commit 0d5e910f19657ab376f72e5848be50d13d3b8e50
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Ryan C. Thompson <rct@thompsonclan.org>

    Add an error message for unhandled case
    
    with-simulated-input currently doesn't work from byte-compiled code.
    With this commit, it still doesn't work, but now it should produce a
    germane error message.
    
    See #6.
---
 with-simulated-input.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/with-simulated-input.el b/with-simulated-input.el
index 0f344f1675..a70e7eb523 100644
--- a/with-simulated-input.el
+++ b/with-simulated-input.el
@@ -111,6 +111,8 @@ extracting and returning its lexical environment.
 This can be used to manually construct closures in that
 environment."
   `(let ((temp-closure (lambda () t)))
+     (unless (listp temp-closure)
+       (error "Cannot capture lexical environment from byte-compiled code"))
      (when (eq (car temp-closure) 'closure)
        (cadr temp-closure))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]