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

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

[nongnu] elpa/buttercup 5458dcc 158/340: Replace buttercup-*-parents wit


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup 5458dcc 158/340: Replace buttercup-*-parents with buttercup-suite-or-spec-parents
Date: Thu, 16 Dec 2021 14:59:25 -0500 (EST)

branch: elpa/buttercup
commit 5458dccf891f112ec1a951ae9dbe5e0bf5a4616c
Author: Ola Nilsson <ola.nilsson@gmail.com>
Commit: Jorgen Schäfer <Jorgen.Schaefer@gmail.com>

    Replace buttercup-*-parents with buttercup-suite-or-spec-parents
---
 buttercup.el | 27 +++++++++------------------
 1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/buttercup.el b/buttercup.el
index be87a5c..9d43b3d 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -692,25 +692,16 @@ See also `buttercup-define-matcher'."
   (setf (buttercup-suite-children parent)
         (append (buttercup-suite-children parent)
                 (list child)))
-  (if (buttercup-suite-p child)
-      (setf (buttercup-suite-parent child)
-            parent)
-    (setf (buttercup-spec-parent child)
-          parent)))
-
-(defun buttercup-suite-parents (suite)
-  "Return a list of parents of SUITE."
-  (if (buttercup-suite-parent suite)
-      (cons (buttercup-suite-parent suite)
-            (buttercup-suite-parents (buttercup-suite-parent suite)))
-    nil))
+  (setf (buttercup-suite-or-spec-parent child) parent))
 
-(defun buttercup-spec-parents (spec)
-  "Return a list of parents of SPEC."
-  (if (buttercup-spec-parent spec)
-      (cons (buttercup-spec-parent spec)
-            (buttercup-suite-parents (buttercup-spec-parent spec)))
-    nil))
+(defun buttercup-suite-or-spec-parents (suite-or-spec)
+  "Return a list of parents of SUITE-OR-SPEC."
+  (when (buttercup-suite-or-spec-parent suite-or-spec)
+    (cons (buttercup-suite-or-spec-parent suite-or-spec)
+          (buttercup-suite-or-spec-parents (buttercup-suite-or-spec-parent 
suite-or-spec)))))
+
+(define-obsolete-function-alias 'buttercup-suite-parents 
'buttercup-suite-or-spec-parents "emacs-buttercup 1.10")
+(define-obsolete-function-alias 'buttercup-spec-parents 
'buttercup-suite-or-spec-parents "emacs-buttercup 1.10")
 
 (defun buttercup-suites-total-specs-defined (suite-list)
   "Return the number of specs defined in all suites in SUITE-LIST."



reply via email to

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