[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-real d81217c 045/160: Refactoring
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-real d81217c 045/160: Refactoring |
Date: |
Wed, 6 Oct 2021 16:58:12 -0400 (EDT) |
branch: externals/org-real
commit d81217ca70a00e9af58100f61cf7ce0921b1a08d
Author: Tyler Grinn <tylergrinn@gmail.com>
Commit: Tyler Grinn <tylergrinn@gmail.com>
Refactoring
---
org-real.el | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/org-real.el b/org-real.el
index 28df092..f5d5417 100644
--- a/org-real.el
+++ b/org-real.el
@@ -345,7 +345,7 @@ ORIG is `org-insert-link', ARGS are the arguments passed to
it."
(append (if (slot-boundp collection :box) (list box))
(if (slot-boundp collection :next) (org-real--get-all next)))))
-(cl-defmethod org-real--add-to-list ((collection org-real-box-collection)
+(cl-defmethod org-real--push ((collection org-real-box-collection)
(box org-real-box))
"Add BOX to COLLECTION and return new COLLECTION."
(if (slot-boundp collection :box)
@@ -365,7 +365,7 @@ property and optionally a :rel property."
(base (org-real-box :name (plist-get base-container :name))))
(oset base :parent world)
(with-slots (children) world
- (setq children (org-real--add-to-list children base)))
+ (setq children (org-real--push children base)))
(if containers
(org-real--make-instance-helper containers world base))
world))
@@ -619,12 +619,14 @@ PREV must already existing in PARENT."
(if (and prev (member rel '("in" "on" "behind" "in front of")))
(progn
(oset box :parent prev)
- (oset prev :children (org-real--add-to-list (with-slots (children)
prev children) box))
+ (with-slots (children) prev
+ (setq children (org-real--push children box)))
(if containers
(org-real--make-instance-helper containers prev box)
(oset box :primary t)))
(oset box :parent parent)
- (oset parent :children (org-real--add-to-list (with-slots (children)
parent children) box))
+ (with-slots (children) parent
+ (setq children (org-real--push children box)))
(if containers
(org-real--make-instance-helper containers parent box)
(oset box :primary t)))))
@@ -758,9 +760,8 @@ of BOX."
(if (member rel '("in" "on" "behind" "in front of"))
(org-real--flex-add next match world)
(oset next :parent parent)
- (oset parent :children (org-real--add-to-list
- (with-slots (children) parent children)
- next)))
+ (with-slots (children) parent
+ (setq children (org-real--push children next))))
(org-real--add-matching next next world)))
next-boxes))))
@@ -795,7 +796,8 @@ that the width of WORLD is kept below 80 characters if
possible."
siblings)
(org-real-box :y-order -9999)))))
(oset box :parent parent)
- (oset parent :children (org-real--add-to-list (with-slots (children)
parent children) box))
+ (with-slots (children) parent
+ (setq children (org-real--push children box)))
(when (and last-sibling (not (with-slots (in-front) box in-front)))
(with-slots
((last-sibling-y y-order)
- [elpa] externals/org-real d07bf14 020/160: find-last index returns nil if no match, (continued)
- [elpa] externals/org-real d07bf14 020/160: find-last index returns nil if no match, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real a16fed2 032/160: Linting, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 9608f53 030/160: Satisfying elc compiler, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real dbd7b45 037/160: Check for compiler warnings in CI/CD pipeline, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 463da8b 029/160: Refactoring, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 6d8351f 038/160: Renamed org-real--box to org-real-box, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 4a569a1 039/160: Merge branch 'next' into 'main', ELPA Syncer, 2021/10/06
- [elpa] externals/org-real d161250 041/160: Removed reference to org-real-box, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 9ac40b5 042/160: v0.1.0, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 181c538 043/160: Patch for using cl-defmethod rather than defun, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real d81217c 045/160: Refactoring,
ELPA Syncer <=
- [elpa] externals/org-real cf2778a 049/160: Whitespace cleanup, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real cdce61e 058/160: Linting, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 03234f7 059/160: Requirements before patches, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 8550ace 004/160: Added alias "on" for "in", ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 72bf24b 007/160: Added documentation, ci/cd, and completion, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real c513e06 016/160: Updated readme, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 7f33978 027/160: Added apply function for rearranging other links, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 371024e 035/160: Satisfying ELC compiler, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real 3e325b3 021/160: Simplified merge function, ELPA Syncer, 2021/10/06
- [elpa] externals/org-real abb5aed 061/160: More edge cases, ELPA Syncer, 2021/10/06