Merge pull request #429 from paulbdavis/fontify-recurring
Wow! Thank you. I didn't know anyone was using this feature besides myself.
This commit is contained in:
commit
88ad616d18
3 changed files with 19 additions and 2 deletions
|
|
@ -46,7 +46,8 @@
|
|||
(beginning-of-line)
|
||||
(while (< (point) end)
|
||||
(cond ((or (looking-at ledger-xact-start-regex)
|
||||
(looking-at ledger-posting-regex))
|
||||
(looking-at ledger-posting-regex)
|
||||
(looking-at ledger-recurring-line-regexp))
|
||||
(ledger-fontify-xact-at (point)))
|
||||
((looking-at ledger-directive-start-regex)
|
||||
(ledger-fontify-directive-at (point))))
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ Requires empty line separating xacts."
|
|||
(save-excursion
|
||||
(goto-char pos)
|
||||
(beginning-of-line)
|
||||
(if (looking-at "[ =~0-9]")
|
||||
(if (looking-at "[ =~0-9\\[]")
|
||||
(ledger-navigate-find-xact-extents pos)
|
||||
(ledger-navigate-find-directive-extents pos))))
|
||||
|
||||
|
|
|
|||
|
|
@ -238,6 +238,22 @@
|
|||
code
|
||||
(note end-note))
|
||||
|
||||
(ledger-define-regexp recurring-line
|
||||
(macroexpand
|
||||
`(rx (and line-start
|
||||
(regexp "\\[.+/.+/.+\\]")
|
||||
(? (and (+ blank) (regexp ,ledger-state-regexp)))
|
||||
(? (and (+ blank) (regexp ,ledger-code-regexp)))
|
||||
(+ blank) (+? nonl)
|
||||
(? (regexp ,ledger-end-note-regexp))
|
||||
line-end)))
|
||||
"Match a transaction's first line (and optional notes)."
|
||||
(actual-date full-date actual)
|
||||
(effective-date full-date effective)
|
||||
state
|
||||
code
|
||||
(note end-note))
|
||||
|
||||
(ledger-define-regexp account
|
||||
(rx (group (and (not (any blank ?\[ ?\( ?: ?\;)) (*? nonl))))
|
||||
"")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue