Added "=" to the character set used to scan for dates at the beginning
of lines, to accomodate virtual dates. (This came from the mailing list, thanks guys).
This commit is contained in:
parent
ca9ea27081
commit
f56b29eb4b
1 changed files with 4 additions and 4 deletions
|
|
@ -67,7 +67,7 @@
|
||||||
|
|
||||||
(defvar bold 'bold)
|
(defvar bold 'bold)
|
||||||
(defvar ledger-font-lock-keywords
|
(defvar ledger-font-lock-keywords
|
||||||
'(("^[0-9./]+\\s-+\\(?:([^)]+)\\s-+\\)?\\([^*].+\\)" 1 bold)
|
'(("^[0-9./=]+\\s-+\\(?:([^)]+)\\s-+\\)?\\([^*].+\\)" 1 bold)
|
||||||
("^\\s-+.+?\\( \\|\t\\|\\s-+$\\)" . font-lock-keyword-face))
|
("^\\s-+.+?\\( \\|\t\\|\\s-+$\\)" . font-lock-keyword-face))
|
||||||
"Default expressions to highlight in Ledger mode.")
|
"Default expressions to highlight in Ledger mode.")
|
||||||
|
|
||||||
|
|
@ -184,7 +184,7 @@ Return the difference in the format of a time value."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(when (or (looking-at "^[0-9]")
|
(when (or (looking-at "^[0-9]")
|
||||||
(re-search-backward "^[0-9]" nil t))
|
(re-search-backward "^[0-9]" nil t))
|
||||||
(skip-chars-forward "0-9./")
|
(skip-chars-forward "0-9./=")
|
||||||
(delete-horizontal-space)
|
(delete-horizontal-space)
|
||||||
(if (member (char-after) '(?\* ?\!))
|
(if (member (char-after) '(?\* ?\!))
|
||||||
(progn
|
(progn
|
||||||
|
|
@ -215,7 +215,7 @@ dropped."
|
||||||
;; transaction
|
;; transaction
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (car bounds))
|
(goto-char (car bounds))
|
||||||
(skip-chars-forward "0-9./ \t")
|
(skip-chars-forward "0-9./= \t")
|
||||||
(setq cleared (and (member (char-after) '(?\* ?\!))
|
(setq cleared (and (member (char-after) '(?\* ?\!))
|
||||||
(char-after)))
|
(char-after)))
|
||||||
(when cleared
|
(when cleared
|
||||||
|
|
@ -297,7 +297,7 @@ dropped."
|
||||||
(insert (make-string width ? ))))))
|
(insert (make-string width ? ))))))
|
||||||
(forward-line))
|
(forward-line))
|
||||||
(goto-char (car bounds))
|
(goto-char (car bounds))
|
||||||
(skip-chars-forward "0-9./ \t")
|
(skip-chars-forward "0-9./= \t")
|
||||||
(insert state " ")
|
(insert state " ")
|
||||||
(if (search-forward " " (line-end-position) t)
|
(if (search-forward " " (line-end-position) t)
|
||||||
(delete-char 2)))))
|
(delete-char 2)))))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue