summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-fontify.el2
-rw-r--r--lisp/ledger-mode.el7
2 files changed, 5 insertions, 4 deletions
diff --git a/lisp/ledger-fontify.el b/lisp/ledger-fontify.el
index 7621b448..f282167e 100644
--- a/lisp/ledger-fontify.el
+++ b/lisp/ledger-fontify.el
@@ -63,7 +63,7 @@
(if (string= (format-mode-line 'mode-name) "Ledger")
(add-hook 'after-change-functions 'ledger-fontify-buffer-part)))
-(defun ledger-fontify-buffer-part (beg end)
+(defun ledger-fontify-buffer-part (beg end len)
(save-excursion
;; (message (concat "ledger-fontify-buffer-part: "
;; (int-to-string beg) " "
diff --git a/lisp/ledger-mode.el b/lisp/ledger-mode.el
index 1f6d8c32..94b1f591 100644
--- a/lisp/ledger-mode.el
+++ b/lisp/ledger-mode.el
@@ -347,14 +347,15 @@ With a prefix argument, remove the effective date. "
(if (boundp 'font-lock-defaults)
(setq-local font-lock-defaults
- '(ledger-font-lock-keywords t t)))
+ '(ledger-font-lock-keywords t t nil nil
+ (font-lock-fontify-region-function . ledger-fontify-buffer-part))))
;; (setq font-lock-extend-region-functions
;; (list #'font-lock-extend-region-wholelines))
;; (setq font-lock-multiline nil)
- (jit-lock-register 'ledger-fontify-buffer-part)
- (jit-lock-unregister 'font-lock-fontify-region)
+ ;(jit-lock-register 'ledger-fontify-buffer-part)
+ ;(jit-lock-unregister 'font-lock-fontify-region)
(setq-local pcomplete-parse-arguments-function 'ledger-parse-arguments)
(setq-local pcomplete-command-completion-function 'ledger-complete-at-point)