emacs-diffs
[Top][All Lists]
Advanced

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

master 63e4ed1: Recreate symptom of Bug#42701.


From: Philipp Stephani
Subject: master 63e4ed1: Recreate symptom of Bug#42701.
Date: Tue, 18 May 2021 12:49:43 -0400 (EDT)

branch: master
commit 63e4ed1c8f1c5bbf59c366134d379bae972201f9
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>

    Recreate symptom of Bug#42701.
    
    The fix to Bug#48489 (commit 9676d41b8301b84e07717e633059a3f2b5c4c9d8)
    has masked the symptom of Bug#42701 for 'if-let'.  Create a helper
    macro that still exemplifies the bug.
    
    * test/lisp/emacs-lisp/edebug-tests.el
    (edebug-tests--duplicate-symbol-backtrack): New helper macro.
    (edebug-tests-duplicate-symbol-backtrack): Use it instead of 'if-let'.
---
 test/lisp/emacs-lisp/edebug-tests.el | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/test/lisp/emacs-lisp/edebug-tests.el 
b/test/lisp/emacs-lisp/edebug-tests.el
index 7d45432..2f45050 100644
--- a/test/lisp/emacs-lisp/edebug-tests.el
+++ b/test/lisp/emacs-lisp/edebug-tests.el
@@ -1029,14 +1029,21 @@ clashes (Bug#41853)."
                                     inner@cl-flet@10002
                                     edebug-tests-cl-flet-2)))))))
 
+(defmacro edebug-tests--duplicate-symbol-backtrack (arg)
+  "Helper macro that exemplifies Bug#42701.
+ARG is either (FORM) or (FORM IGNORED)."
+  (declare (debug ([&or (form) (form sexp)])))
+  (car arg))
+
 (ert-deftest edebug-tests-duplicate-symbol-backtrack ()
   "Check that Edebug doesn't create duplicate symbols when
 backtracking (Bug#42701)."
   (with-temp-buffer
-    (dolist (form '((require 'subr-x)
-                    (defun edebug-tests-duplicate-symbol-backtrack ()
-                      (if-let (x (funcall (lambda (y) 1) 2)) 3 4))))
-      (print form (current-buffer)))
+    (print '(defun edebug-tests-duplicate-symbol-backtrack ()
+              (edebug-tests--duplicate-symbol-backtrack
+               ;; Passing (FORM IGNORED) forces backtracking.
+               ((lambda () 123) ignored)))
+           (current-buffer))
     (let* ((edebug-all-defs t)
            (edebug-initial-mode 'Go-nonstop)
            (instrumented-names ())



reply via email to

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