From fec5ecb4f34bca2fbfe7f7ee5c1e99a9527db01e Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Fri, 5 Sep 2014 20:12:03 -0700 Subject: meh. Still chugging along. --- lisp/ledger-fontify.el | 13 +++++++------ lisp/ledger-mode.el | 7 ++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lisp/ledger-fontify.el b/lisp/ledger-fontify.el index 86fd35c5..f282167e 100644 --- a/lisp/ledger-fontify.el +++ b/lisp/ledger-fontify.el @@ -54,8 +54,9 @@ (interactive) (if (string= (format-mode-line 'mode-name) "Ledger") (progn + (ledger-fontify-whole-buffer) (add-hook 'after-change-functions 'ledger-fontify-buffer-part) -; (add-hook 'before-change-functions 'ledger-fontify-ensure-activation) + (add-hook 'before-change-functions 'ledger-fontify-ensure-activation) (message "ledger-fontify-activate called")))) (defun ledger-fontify-ensure-activation (beg end) @@ -64,11 +65,11 @@ (defun ledger-fontify-buffer-part (beg end len) (save-excursion - (message (concat "ledger-fontify-buffer-part: " - (int-to-string beg) " " - (int-to-string end) " " - (int-to-string len) - )) + ;; (message (concat "ledger-fontify-buffer-part: " + ;; (int-to-string beg) " " + ;; (int-to-string end) " " + ;; (int-to-string len) + ;; )) ; (goto-char beg) (backward-paragraph) (forward-char) diff --git a/lisp/ledger-mode.el b/lisp/ledger-mode.el index 0e8ad088..46b7e677 100644 --- a/lisp/ledger-mode.el +++ b/lisp/ledger-mode.el @@ -329,10 +329,11 @@ With a prefix argument, remove the effective date. " ;; (font-lock-fontify-buffer-function . ledger-fontify-whole-buffer) ;; (font-lock-fontify-region-function . ledger-fontify-buffer-part))) - (setq-local font-lock-defaults `(,ledger-font-lock-keywords nil t nil nil - (font-lock-fontify-buffer-function . ledger-fontify-whole-buffer))) + ;; (setq-local font-lock-defaults `(,ledger-font-lock-keywords nil t nil nil + ;; (font-lock-fontify-buffer-function . ledger-fontify-whole-buffer))) - (setq-local indent-region-function 'ledger-post-align-postings)) + (setq-local indent-region-function 'ledger-post-align-postings) + (ledger-fontify-activate)) (defun ledger-set-year (newyear) -- cgit v1.2.3