Seems to be working. I wasn't ensuring I caught all the xacts in a region specified by hit lock.

Now I need to prune code
This commit is contained in:
Craig Earls 2014-09-08 20:31:45 -07:00
parent 77e77f39dc
commit 57e2ec55eb

View file

@ -65,19 +65,17 @@
(defun ledger-fontify-buffer-part (beg end len) (defun ledger-fontify-buffer-part (beg end len)
(save-excursion (save-excursion
;; (message (concat "ledger-fontify-buffer-part: " (unless beg (setq beg (point-min)))
;; (int-to-string beg) " " (unless end (setq end (point-max)))
;; (int-to-string end) " " (unless len (setq len (- end beg)))
;; (int-to-string len) (goto-char beg)
;; )) (while (< (point) end)
; (goto-char beg) (cond ((or (looking-at ledger-xact-start-regex)
(backward-paragraph) (looking-at ledger-posting-regex))
(forward-char) (ledger-fontify-xact-at (point)))
(cond ((or (looking-at ledger-xact-start-regex) ((looking-at ledger-directive-start-regex)
(looking-at ledger-posting-regex)) (ledger-fontify-directive-at (point))))
(ledger-fontify-xact-at (point))) (ledger-xact-next-xact-or-directive))))
((looking-at ledger-directive-start-regex)
(ledger-fontify-directive-at (point))))))
(defun ledger-fontify-xact-at (position) (defun ledger-fontify-xact-at (position)
(interactive "d") (interactive "d")