branch: elpa/ebuild-mode
commit b111c8e6aeaf999b9d8f2412bbdc07a2bf5f334c
Author: Ulrich Müller <[email protected]>
Commit: Ulrich Müller <[email protected]>

    Tweak macro in XEmacs test wrapper
    
    * test/xemacs-test-wrapper.el (should): Simplify.
    
    Signed-off-by: Ulrich Müller <[email protected]>
---
 ChangeLog                   |  2 ++
 test/xemacs-test-wrapper.el | 14 ++++++--------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bf964e4a2b..fb3bdf11fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2026-10-21  Ulrich Müller  <[email protected]>
 
+       * test/xemacs-test-wrapper.el (should): Simplify.
+
        * ebuild-mode.el (ebuild-mode-add-font-lock): Fix initial
        fontification in XEmacs.
 
diff --git a/test/xemacs-test-wrapper.el b/test/xemacs-test-wrapper.el
index 38e2cb08ab..44e5044830 100644
--- a/test/xemacs-test-wrapper.el
+++ b/test/xemacs-test-wrapper.el
@@ -49,14 +49,12 @@
   (unless cond (signal 'test-skipped nil)))
 
 (defmacro should (assertion)
-  (let ((args (ignore-errors
-               (destructuring-bind (s1 (s2 form) (s3 (err msg)))
-                   assertion
-                 (list (list s1 s2 s3) err msg form)))))
-    ;; handle (should (equal (should-error ...) '(error ...)))
-    (if (equal (car args) '(equal should-error quote))
-       `(Check-Error-Message ,@(cdr args))
-      `(Assert ,assertion))))
+  (or (ignore-errors
+       ;; handle (should (equal (should-error ...) '(error ...)))
+       (destructuring-bind (s1 (s2 form) (s3 (err msg))) assertion
+         (if (equal (list s1 s2 s3) '(equal should-error quote))
+             `(Check-Error-Message ,err ,msg ,form))))
+      `(Assert ,assertion)))
 
 (defmacro should-not (assertion)
   `(Assert (not ,assertion)))

Reply via email to