branch: elpa/beancount commit d4db16f0eeb1c73e39712cdf77094ef9c5cfd905 Author: Daniele Nicolodi <dani...@grinta.net> Commit: Daniele Nicolodi <dani...@grinta.net>
beancount.el: Fix fontification of outline headings Headings were not fontified correctly when they contained beancount syntax elements. Fix this reordering font-lock-keywords such that rules for whole lines come first. --- beancount.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beancount.el b/beancount.el index cd7d009093..f6dce380eb 100644 --- a/beancount.el +++ b/beancount.el @@ -264,6 +264,8 @@ to align all amounts." (,beancount-directive-regexp (1 'beancount-directive)) (,beancount-timestamped-directive-regexp (1 'beancount-date) (2 'beancount-directive)) + ;; Fontify section headers when composed with outline-minor-mode. + (,(concat "^\\(" beancount-outline-regexp "\\).*") . (0 (beancount-outline-face))) ;; Tags and links. (,(concat "\\#[" beancount-tag-chars "]*") . 'beancount-tag) (,(concat "\\^[" beancount-tag-chars "]*") . 'beancount-link) @@ -271,8 +273,6 @@ to align all amounts." (,(concat beancount-number-regexp "\\s-+" beancount-currency-regexp) . 'beancount-amount) ;; Accounts not covered by previous rules. (,beancount-account-regexp . 'beancount-account) - ;; Fontify section headers when composed with outline-minor-mode. - (,(concat "^\\(" beancount-outline-regexp "\\).*") . (0 (beancount-outline-face))) )) (defun beancount-tab-dwim (&optional arg)