summaryrefslogtreecommitdiff
path: root/lisp/ledger-reconcile.el
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2014-07-09 06:29:17 -0700
committerCraig Earls <enderw88@gmail.com>2014-07-09 06:29:17 -0700
commited692ee9a8c2dc78988f7c905e1f2f5e77c88af8 (patch)
treeeffb35fa2ca5480e0b59a0c745422aea54b8c55e /lisp/ledger-reconcile.el
parent8efc3e37958571913ba41cdc8132a38d8f488b36 (diff)
parent4a71dc05e69410c4603a1c6b62fa12c5a289dabd (diff)
downloadfork-ledger-ed692ee9a8c2dc78988f7c905e1f2f5e77c88af8.tar.gz
fork-ledger-ed692ee9a8c2dc78988f7c905e1f2f5e77c88af8.tar.bz2
fork-ledger-ed692ee9a8c2dc78988f7c905e1f2f5e77c88af8.zip
Merge pull request #308 from vanicat/t/dont-use-flatten
Thanks for catching this. I wonder why they took it out? This is much less readable than 'flatten'.
Diffstat (limited to 'lisp/ledger-reconcile.el')
-rw-r--r--lisp/ledger-reconcile.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ledger-reconcile.el b/lisp/ledger-reconcile.el
index d5188112..c9eab502 100644
--- a/lisp/ledger-reconcile.el
+++ b/lisp/ledger-reconcile.el
@@ -323,9 +323,9 @@ POSTING is used in `ledger-clear-whole-transactions' is nil."
(let (fields
(start 0))
(while (string-match "(\\(.*?\\))" fstr start)
- (setq fields (list fields (intern (substring fstr (match-beginning 1) (match-end 1)))))
+ (setq fields (cons (intern (match-string 1 fstr)) fields))
(setq start (match-end 0)))
- (setq fields (flatten (list 'format (replace-regexp-in-string "(.*?)" "" fstr) (cdr (flatten fields)))))
+ (setq fields (list* 'format (replace-regexp-in-string "(.*?)" "" fstr) (nreverse fields)))
`(lambda (date code status payee account amount)
,fields)))