diff options
author | Craig Earls <enderw88@gmail.com> | 2013-02-09 21:03:58 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2013-02-09 21:03:58 -0700 |
commit | 6fce572806eb39b5ba607bd5336adb6ca3ac2295 (patch) | |
tree | e69c8ffbccf033d3ecd176da41cd667c297e2e42 /lisp/ldg-occur.el | |
parent | 114be62d248723bfae12e383b168f364857d8793 (diff) | |
download | fork-ledger-6fce572806eb39b5ba607bd5336adb6ca3ac2295.tar.gz fork-ledger-6fce572806eb39b5ba607bd5336adb6ca3ac2295.tar.bz2 fork-ledger-6fce572806eb39b5ba607bd5336adb6ca3ac2295.zip |
ledger-mode now highlights the xact under point.
This can be configured with ledger-highlight-xact-under-point and ledger-font-highlight-face
Diffstat (limited to 'lisp/ldg-occur.el')
-rw-r--r-- | lisp/ldg-occur.el | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/lisp/ldg-occur.el b/lisp/ldg-occur.el index d498b9e4..1afb0e90 100644 --- a/lisp/ldg-occur.el +++ b/lisp/ldg-occur.el @@ -208,23 +208,6 @@ When REGEX is nil, unhide everything, and remove higlight" buffer-matches) (setq overlays (nreverse overlays))))) -(defun ledger-occur-find-xact-extents (pos) - "return point for beginning of xact and and of xact containing - position. Requires empty line separating xacts" - (interactive "d") - (save-excursion - (goto-char pos) - (let ((end-pos pos) - (beg-pos pos)) - (backward-paragraph) - (forward-line) - (beginning-of-line) - (setq beg-pos (point)) - (forward-paragraph) - (forward-line -1) - (end-of-line) - (setq end-pos (1+ (point))) - (list beg-pos end-pos)))) (defun ledger-occur-find-matches (regex) "Returns a list of 2-number tuples, specifying begnning of the @@ -241,7 +224,7 @@ When REGEX is nil, unhide everything, and remove higlight" ;; if something found (when (setq endpoint (re-search-forward regex nil 'end)) (save-excursion - (let ((bounds (ledger-occur-find-xact-extents (match-beginning 0)))) + (let ((bounds (ledger-find-xact-extents (match-beginning 0)))) (push bounds lines) (setq curpoint (cadr bounds)))) ;move to the end of the ;xact, no need to search |