Simplified ledger-mode's font-lock-regexps
This commit is contained in:
parent
a6325388f4
commit
236f1c6dd2
1 changed files with 11 additions and 11 deletions
|
|
@ -128,17 +128,17 @@ text that should replace the format specifier."
|
||||||
|
|
||||||
(defvar bold 'bold)
|
(defvar bold 'bold)
|
||||||
(defvar ledger-font-lock-keywords
|
(defvar ledger-font-lock-keywords
|
||||||
'(("^[0-9./=]+\\s-+\\(?:([^)*]+)\\s-+\\)?\\(.+\\)" 1 bold)
|
'(("\\( \\| \\|^\\)\\(;.*\\)" 2 font-lock-comment-face)
|
||||||
("\s \\{5,\\}\\([$]-[0-9][0-9,.]*\\)" 1 font-lock-warning-face)
|
("^[0-9]+[-/.=][-/.=0-9]+\\s-+\\(([^)]+)\\s-+\\)?\\([^*].+?\\)\\(\\( ;\\| ;\\|$\\)\\)" 2 bold)
|
||||||
("\s \\{5,\\}\\(-?[0-9][0-9,.]*\\)" 1 font-lock-type-face)
|
;;("^[0-9]+[-/.=][-/.=0-9]+\\s-+\\(([^)]+)\\s-+\\)?\\([*].+?\\)\\(\\( ;\\| ;\\|$\\)\\)"
|
||||||
("^\\s-+.+?\\( \\|\t\\|\n\\|\\s-+$\\)" . font-lock-keyword-face)
|
;; 2 font-lock-type-face)
|
||||||
("^\s +\\((\\)\\([A-Za-z0-9]+:[A-Za-z0-9]+[A-Za-z0-9: ]*\\)\\()\\)"
|
("^\\s-+\\([*]\\s-*\\)?\\(\\([[(]\\)?[^*:
|
||||||
(1 font-lock-function-name-face)
|
]+?:[^]);
|
||||||
(2 font-lock-variable-name-face)
|
]+?\\([])]\\)?\\)\\( \\| \\|$\\)"
|
||||||
(3 font-lock-function-name-face))
|
2 font-lock-keyword-face)
|
||||||
("^[0-9]+[/-][0-9]+.*\\([*]\\)" 1 bold)
|
("^\\([~=].+\\)" 1 font-lock-function-name-face)
|
||||||
("^\\([~=]\\)\\s " 1 font-lock-function-name-face))
|
("^\\([A-Za-z]+ .+\\)" 1 font-lock-function-name-face))
|
||||||
"Improved expressions to highlight in Ledger mode.")
|
"Expressions to highlight in Ledger mode.")
|
||||||
|
|
||||||
(defsubst ledger-current-year ()
|
(defsubst ledger-current-year ()
|
||||||
(format-time-string "%Y"))
|
(format-time-string "%Y"))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue