diff options
author | Craig Earls <enderw88@gmail.com> | 2015-09-18 06:53:23 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2015-09-18 06:53:23 -0700 |
commit | 5905c21ded741a9d17f67999a7e4c33da6c886c8 (patch) | |
tree | 8c373a1ceb8da8011cb41f1334b103eac3ef5b86 /lisp | |
parent | 1b3dfe93c53a6926d8027a2957be2645e22c9581 (diff) | |
parent | 88ad616d18b69eb03bc14eaa9ce6b32be90867a6 (diff) | |
download | fork-ledger-5905c21ded741a9d17f67999a7e4c33da6c886c8.tar.gz fork-ledger-5905c21ded741a9d17f67999a7e4c33da6c886c8.tar.bz2 fork-ledger-5905c21ded741a9d17f67999a7e4c33da6c886c8.zip |
Merge commit '88ad616d18b69eb03bc14eaa9ce6b32be90867a6' into next
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ledger-fontify.el | 3 | ||||
-rw-r--r-- | lisp/ledger-navigate.el | 2 | ||||
-rw-r--r-- | lisp/ledger-regex.el | 16 |
3 files changed, 19 insertions, 2 deletions
diff --git a/lisp/ledger-fontify.el b/lisp/ledger-fontify.el index 2d4f850e..076e52b7 100644 --- a/lisp/ledger-fontify.el +++ b/lisp/ledger-fontify.el @@ -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)))) diff --git a/lisp/ledger-navigate.el b/lisp/ledger-navigate.el index 4da857a7..7ac440f7 100644 --- a/lisp/ledger-navigate.el +++ b/lisp/ledger-navigate.el @@ -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)))) diff --git a/lisp/ledger-regex.el b/lisp/ledger-regex.el index 9d8394df..5d525d95 100644 --- a/lisp/ledger-regex.el +++ b/lisp/ledger-regex.el @@ -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)))) "") |