From 4a71dc05e69410c4603a1c6b62fa12c5a289dabd Mon Sep 17 00:00:00 2001 From: RĂ©mi Vanicat Date: Wed, 9 Jul 2014 14:32:31 +0200 Subject: ledger-reconcile.el: don't use flatten The flatten function is not part of Emacs, so better not use it. --- lisp/ledger-reconcile.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/ledger-reconcile.el') 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))) -- cgit v1.2.3