meh. Still chugging along.

This commit is contained in:
Craig Earls 2014-09-05 20:12:03 -07:00
parent d3d5c333f5
commit fec5ecb4f3
2 changed files with 11 additions and 9 deletions

View file

@ -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)

View file

@ -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)