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

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

[elpa] externals/taxy ab39a58 1/2: Fix: (taxy-fill) Always call take fun


From: ELPA Syncer
Subject: [elpa] externals/taxy ab39a58 1/2: Fix: (taxy-fill) Always call take function if present
Date: Mon, 30 Aug 2021 00:57:16 -0400 (EDT)

branch: externals/taxy
commit ab39a58db0a2170a0d7a02b01d22ab395bff27f7
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Fix: (taxy-fill) Always call take function if present
    
    Fixes "chains" of taxys.
---
 README.org |  4 ++++
 taxy.el    | 36 ++++++++++++++++--------------
 taxy.info  | 75 ++++++++++++++++++++++++++++++++++++--------------------------
 3 files changed, 67 insertions(+), 48 deletions(-)

diff --git a/README.org b/README.org
index aa86704..1dcdb01 100644
--- a/README.org
+++ b/README.org
@@ -780,6 +780,10 @@ Note that while =taxy-magit-section.el= is installed with 
the =taxy= package, th
 
 +  Within the ~taxy~ struct and related functions, the term =objects= is 
renamed to =items=, which is more concise but has the same meaning.  This makes 
code a bit more concise (e.g. ~(taxy-objects taxy)~ becomes ~(taxy-items 
taxy)~).
 
+*** Fixes
+
++  Function ~taxy-fill~ always calls a taxy's ~:take~ function if present.  
(Fixing "chains" of dynamic taxys.)
+
 ** 0.2
 
 *** Changes
diff --git a/taxy.el b/taxy.el
index fc3319b..06f169a 100644
--- a/taxy.el
+++ b/taxy.el
@@ -73,23 +73,25 @@
 (defun taxy-fill (items taxy)
   "Fill TAXY with ITEMS according to its definition."
   (cl-labels ((apply-item (item taxy)
-                            (or (cl-loop for taxy in (taxy-taxys taxy)
-                                         when (funcall (taxy-predicate taxy) 
item)
-                                         do (progn
-                                              (if (taxy-take taxy)
-                                                  (funcall (taxy-take taxy) 
item taxy)
-                                                (if (taxy-taxys taxy)
-                                                    (or (apply-item item taxy)
-                                                        (push item (taxy-items 
taxy)))
-                                                  (push item (taxy-items 
taxy))))
-                                              (setf item (funcall (taxy-then 
taxy) item)))
-                                         unless item return t
-                                         finally return nil)
-                                ;; No sub-taxys took the item: add it to this 
taxy.
-                                (when (funcall (taxy-predicate taxy) item)
-                                  (if (taxy-take taxy)
-                                      (funcall (taxy-take taxy) item taxy)
-                                    (push item (taxy-items taxy)))))))
+                          (or (if (taxy-take taxy)
+                                 (funcall (taxy-take taxy) item taxy)
+                               (cl-loop for taxy in (taxy-taxys taxy)
+                                        when (funcall (taxy-predicate taxy) 
item)
+                                        do (progn
+                                             (if (taxy-take taxy)
+                                                 (funcall (taxy-take taxy) 
item taxy)
+                                               (if (taxy-taxys taxy)
+                                                   (or (apply-item item taxy)
+                                                       (push item (taxy-items 
taxy)))
+                                                 (push item (taxy-items 
taxy))))
+                                             (setf item (funcall (taxy-then 
taxy) item)))
+                                        unless item return t
+                                        finally return nil))
+                              ;; No sub-taxys took the item: add it to this 
taxy.
+                              (when (funcall (taxy-predicate taxy) item)
+                                (if (taxy-take taxy)
+                                    (funcall (taxy-take taxy) item taxy)
+                                  (push item (taxy-items taxy)))))))
     (dolist (item items taxy)
       (apply-item item taxy))))
 
diff --git a/taxy.info b/taxy.info
index d56ebf0..e00d0ee 100644
--- a/taxy.info
+++ b/taxy.info
@@ -55,13 +55,15 @@ Changelog
 0.3-pre
 
 * Changes::
+* Fixes::
+
 
 
 0.2
 
 * Changes: Changesx. 
 * Additions::
-* Fixes::
+* Fixes: Fixesx. 
 
 Development
 
@@ -909,9 +911,10 @@ File: README.info,  Node: 03-pre,  Next: 02,  Up: Changelog
 * Menu:
 
 * Changes::
+* Fixes::
 
 
-File: README.info,  Node: Changes,  Up: 03-pre
+File: README.info,  Node: Changes,  Next: Fixes,  Up: 03-pre
 
 4.1.1 Changes
 -------------
@@ -922,6 +925,15 @@ File: README.info,  Node: Changes,  Up: 03-pre
      becomes ‘(taxy-items taxy)’).
 
 
+File: README.info,  Node: Fixes,  Prev: Changes,  Up: 03-pre
+
+4.1.2 Fixes
+-----------
+
+   • Function ‘taxy-fill’ always calls a taxy’s ‘:take’ function if
+     present.  (Fixing "chains" of dynamic taxys.)
+
+
 File: README.info,  Node: 02,  Next: 01,  Prev: 03-pre,  Up: Changelog
 
 4.2 0.2
@@ -931,7 +943,7 @@ File: README.info,  Node: 02,  Next: 01,  Prev: 03-pre,  
Up: Changelog
 
 * Changes: Changesx. 
 * Additions::
-* Fixes::
+* Fixes: Fixesx. 
 
 
 File: README.info,  Node: Changesx,  Next: Additions,  Up: 02
@@ -944,7 +956,7 @@ File: README.info,  Node: Changesx,  Next: Additions,  Up: 
02
      reason to maintain two versions.
 
 
-File: README.info,  Node: Additions,  Next: Fixes,  Prev: Changesx,  Up: 02
+File: README.info,  Node: Additions,  Next: Fixesx,  Prev: Changesx,  Up: 02
 
 4.2.2 Additions
 ---------------
@@ -962,7 +974,7 @@ File: README.info,  Node: Additions,  Next: Fixes,  Prev: 
Changesx,  Up: 02
      *note example: "Chains" of independent multi-level dynamic taxys.
 
 
-File: README.info,  Node: Fixes,  Prev: Additions,  Up: 02
+File: README.info,  Node: Fixesx,  Prev: Additions,  Up: 02
 
 4.2.3 Fixes
 -----------
@@ -1026,32 +1038,33 @@ GPLv3
 
 Tag Table:
 Node: Top218
-Node: Examples1639
-Node: Numbery (starting basically)1958
-Node: Lettery (filling incrementally)7713
-Node: Sporty (understanding completely)10393
-Node: Applications16380
-Node: Installation16780
-Node: Usage17081
-Node: Dynamic taxys19218
-Node: Multi-level dynamic taxys21773
-Node: "Chains" of independent multi-level dynamic taxys23966
-Node: Reusable taxys26838
-Node: Threading macros31007
-Node: Modifying filled taxys31546
-Node: Magit section32629
-Node: Changelog33287
-Node: 03-pre33449
-Node: Changes33559
-Node: 0233901
-Node: Changesx34048
-Node: Additions34333
-Node: Fixes35245
-Node: 0135491
-Node: Development35590
-Node: Copyright assignment35796
-Node: Credits36383
-Node: License36573
+Node: Examples1658
+Node: Numbery (starting basically)1977
+Node: Lettery (filling incrementally)7732
+Node: Sporty (understanding completely)10412
+Node: Applications16399
+Node: Installation16799
+Node: Usage17100
+Node: Dynamic taxys19237
+Node: Multi-level dynamic taxys21792
+Node: "Chains" of independent multi-level dynamic taxys23985
+Node: Reusable taxys26857
+Node: Threading macros31026
+Node: Modifying filled taxys31565
+Node: Magit section32648
+Node: Changelog33306
+Node: 03-pre33468
+Node: Changes33588
+Node: Fixes33944
+Node: 0234165
+Node: Changesx34320
+Node: Additions34605
+Node: Fixesx35518
+Node: 0135765
+Node: Development35864
+Node: Copyright assignment36070
+Node: Credits36657
+Node: License36847
 
 End Tag Table
 



reply via email to

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