no message

This commit is contained in:
Craig Earls 2014-08-26 20:10:51 -07:00
parent 403ca4f1a5
commit dd3fd0e9de
2 changed files with 51 additions and 34 deletions

View file

@ -228,31 +228,51 @@
:group 'ledger-faces)
;; (defvar ledger-font-lock-keywords
;; `( ;; (,ledger-other-entries-regex 1
;; ;; ledger-font-other-face)
;; (,ledger-comment-regex 0
;; 'ledger-font-comment-face)
;; (,ledger-amount-regex 0
;; 'ledger-font-posting-amount-face)
;; (,ledger-multiline-comment-regex 0 'ledger-font-comment-face)
;; (,ledger-payee-pending-regex 2
;; 'ledger-font-payee-pending-face) ; Works
;; (,ledger-payee-cleared-regex 2
;; 'ledger-font-payee-cleared-face) ; Works
;; (,ledger-payee-uncleared-regex 2
;; 'ledger-font-payee-uncleared-face) ; Works
;; (,ledger-account-cleared-regex 2
;; 'ledger-font-posting-account-cleared-face) ; Works
;; (,ledger-account-pending-regex 2
;; 'ledger-font-posting-account-pending-face) ; Works
;; (,ledger-account-any-status-regex 2
;; 'ledger-font-posting-account-face) ; Works
;; (,ledger-other-entries-regex 1
;; 'ledger-font-other-face))
;; "Expressions to highlight in Ledger mode.")
(defvar ledger-font-lock-keywords
`( ;; (,ledger-other-entries-regex 1
;; ledger-font-other-face)
(,ledger-comment-regex 0
'ledger-font-comment-face)
(,ledger-amount-regex 0
'ledger-font-posting-amount-face)
(,ledger-multiline-comment-regex 0 'ledger-font-comment-face)
(,ledger-payee-pending-regex 2
'ledger-font-payee-pending-face) ; Works
(,ledger-payee-cleared-regex 2
'ledger-font-payee-cleared-face) ; Works
(,ledger-payee-uncleared-regex 2
'ledger-font-payee-uncleared-face) ; Works
(,ledger-account-cleared-regex 2
'ledger-font-posting-account-cleared-face) ; Works
(,ledger-account-pending-regex 2
'ledger-font-posting-account-pending-face) ; Works
(,ledger-account-any-status-regex 2
'ledger-font-posting-account-face) ; Works
(,ledger-other-entries-regex 1
'ledger-font-other-face))
`(("account" . ledger-font-account-directive-face)
("apply" . ledger-font-apply-directive-face)
("alias" . ledger-font-alias-directive-face)
("assert" . ledger-font-assert-directive-face)
("bucket" . ledger-font-bucket-directive-face)
("capture" . ledger-font-capture-directive-face)
("check" . ledger-font-check-directive-face)
("commodity" . ledger-font-commodity-directive-face)
("define" . ledger-font-define-directive-face)
("end" . ledger-font-end-directive-face)
("expr" . ledger-font-expr-directive-face)
("fixed" . ledger-font-fixed-directive-face)
("include" . ledger-font-include-directive-face)
("payee" . ledger-font-payee-directive-face)
("tag" . ledger-font-tag-directive-face)
("year" . ledger-font-year-directive-face))
"Expressions to highlight in Ledger mode.")
(provide 'ledger-fonts)
;;; ledger-fonts.el ends here

View file

@ -313,28 +313,25 @@ With a prefix argument, remove the effective date. "
(ledger-schedule-check-available)
;;(ledger-post-setup)
(set (make-local-variable 'pcomplete-parse-arguments-function)
'ledger-parse-arguments)
(set (make-local-variable 'pcomplete-command-completion-function)
'ledger-complete-at-point)
(setq-local pcomplete-parse-arguments-function 'ledger-parse-arguments)
(setq-local pcomplete-command-completion-function 'ledger-complete-at-point)
(add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t)
(add-hook 'after-save-hook 'ledger-report-redo)
;(ledger-fontify-whole-buffer)
;(ledger-fontify-activate)
;(add-hook 'after-save-hook)
(add-hook 'post-command-hook 'ledger-highlight-xact-under-point nil t)
(add-hook 'before-revert-hook 'ledger-occur-remove-all-overlays nil t)
(ledger-init-load-init-file)
(setq font-lock-defaults
'(nil t nil nil nil
(font-lock-fontify-buffer-function . ledger-fontify-whole-buffer)
(font-lock-fontify-region-function . ledger-fontify-buffer-part)))
;; (setq font-lock-defaults
;; `(,ledger-font-lock-keywords t nil nil nil
;; (font-lock-fontify-buffer-function . ledger-fontify-whole-buffer)
;; (font-lock-fontify-region-function . ledger-fontify-buffer-part)))
(set (make-local-variable 'indent-region-function) 'ledger-post-align-postings))
(setq-local font-lock-defaults `(,ledger-font-lock-keywords nil t))
(setq-local indent-region-function 'ledger-post-align-postings))
(defun ledger-set-year (newyear)