From 236f1c6dd2e01f8e37bdb370925992b102138164 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 16 Jun 2009 18:11:36 +0100 Subject: [PATCH] Simplified ledger-mode's font-lock-regexps --- lisp/ledger.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lisp/ledger.el b/lisp/ledger.el index ed69af80..b09ddc34 100644 --- a/lisp/ledger.el +++ b/lisp/ledger.el @@ -128,17 +128,17 @@ text that should replace the format specifier." (defvar bold 'bold) (defvar ledger-font-lock-keywords - '(("^[0-9./=]+\\s-+\\(?:([^)*]+)\\s-+\\)?\\(.+\\)" 1 bold) - ("\s \\{5,\\}\\([$]-[0-9][0-9,.]*\\)" 1 font-lock-warning-face) - ("\s \\{5,\\}\\(-?[0-9][0-9,.]*\\)" 1 font-lock-type-face) - ("^\\s-+.+?\\( \\|\t\\|\n\\|\\s-+$\\)" . font-lock-keyword-face) - ("^\s +\\((\\)\\([A-Za-z0-9]+:[A-Za-z0-9]+[A-Za-z0-9: ]*\\)\\()\\)" - (1 font-lock-function-name-face) - (2 font-lock-variable-name-face) - (3 font-lock-function-name-face)) - ("^[0-9]+[/-][0-9]+.*\\([*]\\)" 1 bold) - ("^\\([~=]\\)\\s " 1 font-lock-function-name-face)) - "Improved expressions to highlight in Ledger mode.") + '(("\\( \\| \\|^\\)\\(;.*\\)" 2 font-lock-comment-face) + ("^[0-9]+[-/.=][-/.=0-9]+\\s-+\\(([^)]+)\\s-+\\)?\\([^*].+?\\)\\(\\( ;\\| ;\\|$\\)\\)" 2 bold) + ;;("^[0-9]+[-/.=][-/.=0-9]+\\s-+\\(([^)]+)\\s-+\\)?\\([*].+?\\)\\(\\( ;\\| ;\\|$\\)\\)" + ;; 2 font-lock-type-face) + ("^\\s-+\\([*]\\s-*\\)?\\(\\([[(]\\)?[^*: + ]+?:[^]); + ]+?\\([])]\\)?\\)\\( \\| \\|$\\)" + 2 font-lock-keyword-face) + ("^\\([~=].+\\)" 1 font-lock-function-name-face) + ("^\\([A-Za-z]+ .+\\)" 1 font-lock-function-name-face)) + "Expressions to highlight in Ledger mode.") (defsubst ledger-current-year () (format-time-string "%Y"))