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'.
This commit is contained in:
commit
ed692ee9a8
1 changed files with 2 additions and 2 deletions
|
|
@ -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)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue