emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/beancount 02fe03ee44 070/103: Fix font lock for accounts


From: ELPA Syncer
Subject: [nongnu] elpa/beancount 02fe03ee44 070/103: Fix font lock for accounts
Date: Mon, 29 Apr 2024 15:59:47 -0400 (EDT)

branch: elpa/beancount
commit 02fe03ee4487de7f83f587db65970b91ebd2d9d7
Author: ying <yingyuyao+yyymeow@gmail.com>
Commit: Martin Blais <blais@furius.ca>

    Fix font lock for accounts
---
 beancount-tests.el | 9 +++++++++
 beancount.el       | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/beancount-tests.el b/beancount-tests.el
index 41d7576d96..be9201d5ae 100644
--- a/beancount-tests.el
+++ b/beancount-tests.el
@@ -129,6 +129,15 @@ Return a list of substrings each followed by its face."
      "1.00 USD"         beancount-amount
      "Assets:Checking"  beancount-account)))
 
+(ert-deftest beancount/fontify-005 ()
+  :tags '(font regress)
+  (beancount-test-font-lock "
+2019-01-01 open Assets:TD:TDB900 TDB900
+"
+   '("2019-01-01"       beancount-date
+     "open"             beancount-directive
+     "Assets:TD:TDB900" beancount-account)))
+
 (ert-deftest beancount/indent-001 ()
   :tags '(indent regress)
   (with-temp-buffer
diff --git a/beancount.el b/beancount.el
index 6daf63b520..9ad9a5eb46 100644
--- a/beancount.el
+++ b/beancount.el
@@ -258,10 +258,10 @@ from the open directive for the relevant account."
     ;; Tags and links.
     (,(concat "\\#[" beancount-tag-chars "]*") . 'beancount-tag)
     (,(concat "\\^[" beancount-tag-chars "]*") . 'beancount-link)
-    ;; Number followed by currency not covered by previous rules.
-    (,(concat beancount-number-regexp "\\s-+" beancount-currency-regexp) . 
'beancount-amount)
     ;; Accounts not covered by previous rules.
     (,beancount-account-regexp . 'beancount-account)
+    ;; Number followed by currency not covered by previous rules.
+    (,(concat beancount-number-regexp "\\s-+" beancount-currency-regexp) . 
'beancount-amount)
     ))
 
 (defun beancount-tab-dwim (&optional arg)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]