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

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

[nongnu] elpa/buttercup ae884f10ad 1/2: Accept un-evaluated functions in


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup ae884f10ad 1/2: Accept un-evaluated functions in buttercup--enclosed-expr
Date: Wed, 26 Oct 2022 16:58:22 -0400 (EDT)

branch: elpa/buttercup
commit ae884f10ad592ea4b832ea9c7541914d8ecfaf38
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Ola Nilsson <ola.nilsson@gmail.com>

    Accept un-evaluated functions in buttercup--enclosed-expr
    
    Turns out unexpanded functions can happen in the wild, as reported in #226.
    And they may have been macroexpanded, which means the quoted and
    expanded expressions may not match.  Remove that check for equality.
    
    Fixes #226.
---
 buttercup.el | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/buttercup.el b/buttercup.el
index 77b4184e40..4ccf836a56 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -76,18 +76,14 @@ ensures access to the un-expanded form."
     (`(closure ,(pred listp) nil
         (quote ,expr) (buttercup--mark-stackframe) ,_expanded)
      expr)
-    ;; This a when FUN has not been evaluated. Probably never happens
-    ;; except when testing buttercup. Should probably do something
-    ;; about that.
+    ;; This a when FUN has not been evaluated.
+    ;; Why does that happen?
     ;; A lambda with an empty arglist and a body containing
     ;; * the quoted original expression
     ;; * the stackframe marker
-    ;; * the original expression
-    ;; In this case expr and expr2 should be equal (but not eq?) as
-    ;; expr2 has not been macroexpanded.
-    ((and `(lambda nil
-             (quote ,expr) (buttercup--mark-stackframe) ,expr2)
-          (guard (equal expr expr2)))
+    ;; * the expanded expression
+    (`(lambda nil
+        (quote ,expr) (buttercup--mark-stackframe) ,_expanded)
      expr)
     ;;; This is when FUN has been byte compiled, as when the entire
     ;;; test file has been byte compiled. Check that it has an empty



reply via email to

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