From 8834fc0c15a53b8db8c2aaee95d2b25a050fe786 Mon Sep 17 00:00:00 2001 From: Dan Peterson Date: Sun, 28 Aug 2011 12:31:42 -0300 Subject: [PATCH 1/2] Highlight account names with spaces. --- lisp/ldg-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/ldg-mode.el b/lisp/ldg-mode.el index 3e9a9106..cc9e8d92 100644 --- a/lisp/ldg-mode.el +++ b/lisp/ldg-mode.el @@ -10,8 +10,8 @@ ;;("^[0-9]+[-/.=][-/.=0-9]+\\s-+\\(([^)]+)\\s-+\\)?\\([*].+?\\)\\(\\( ;\\| ;\\|$\\)\\)" ;; 2 font-lock-type-face) ("^\\s-+\\([*]\\s-*\\)?\\(\\([[(]\\)?[^*: - ]+?:[^]); - ]+?\\([])]\\)?\\)\\( \\| \\|$\\)" + ]+?:\\([^]); + ]\\|\\s-\\)+?\\([])]\\)?\\)\\( \\| \\|$\\)" 2 font-lock-keyword-face) ("^\\([~=].+\\)" 1 font-lock-function-name-face) ("^\\([A-Za-z]+ .+\\)" 1 font-lock-function-name-face)) From 016089aa026ee69d74490f4c54919ae8a2c271ac Mon Sep 17 00:00:00 2001 From: David Gilman Date: Thu, 1 Sep 2011 17:31:49 -0500 Subject: [PATCH 2/2] Add warning to docs about whitespace in ledger format. --- doc/ledger.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/ledger.texi b/doc/ledger.texi index ac7bfc5f..8389c383 100644 --- a/doc/ledger.texi +++ b/doc/ledger.texi @@ -1305,8 +1305,9 @@ The format of each following posting is: ACCOUNT AMOUNT [; NOTE] @end example -The @samp{ACCOUNT} may be surrounded by parentheses if it is a virtual -postings, or square brackets if it is a virtual postings that +Note that there must be at least two spaces between @samp{ACCOUNT} and +@samp{AMOUNT}. The @samp{ACCOUNT} may be surrounded by parentheses if it +is a virtual posting or square brackets if it is a virtual posting that must balance. The @samp{AMOUNT} can be followed by a per-unit posting cost, by specifying @samp{@@ AMOUNT}, or a complete posting cost with @samp{@@@@ AMOUNT}. Lastly, the @samp{NOTE} may