summaryrefslogtreecommitdiff
path: root/lisp/ledger-occur.el
diff options
context:
space:
mode:
authorthdox <thdox@free.fr>2015-02-08 16:40:24 +0100
committerthdox <thdox@free.fr>2015-02-10 21:42:50 +0100
commit8162cc783da82b5383e6403c80930034582bb366 (patch)
tree98f5a4e1d305c6b74c8276619a2eef1f1690af5c /lisp/ledger-occur.el
parentf8dd075e25fae467ad13776eb366a8eb4799f68a (diff)
downloadledger-8162cc783da82b5383e6403c80930034582bb366.tar.gz
ledger-8162cc783da82b5383e6403c80930034582bb366.tar.bz2
ledger-8162cc783da82b5383e6403c80930034582bb366.zip
[emacs] C-x h M-x untabify RET
C-x h M-x indent-region RET [ci skip]
Diffstat (limited to 'lisp/ledger-occur.el')
-rw-r--r--lisp/ledger-occur.el30
1 files changed, 15 insertions, 15 deletions
diff --git a/lisp/ledger-occur.el b/lisp/ledger-occur.el
index a4fde2e1..2ee56e7b 100644
--- a/lisp/ledger-occur.el
+++ b/lisp/ledger-occur.el
@@ -118,7 +118,7 @@ currently active."
Argument OVL-BOUNDS contains bounds for the transactions to be left visible."
(let* ((beg (caar ovl-bounds))
(end (cadar ovl-bounds)))
- (ledger-occur-remove-overlays)
+ (ledger-occur-remove-overlays)
(ledger-occur-make-invisible-overlay (point-min) (1- beg))
(dolist (visible (cdr ovl-bounds))
(ledger-occur-make-visible-overlay beg end)
@@ -143,25 +143,25 @@ Argument OVL-BOUNDS contains bounds for the transactions to be left visible."
(while (not (eobp))
;; if something found
(when (setq endpoint (re-search-forward regex nil 'end))
- (setq bounds (ledger-navigate-find-element-extents endpoint))
- (push bounds lines)
- ;; move to the end of the xact, no need to search inside it more
+ (setq bounds (ledger-navigate-find-element-extents endpoint))
+ (push bounds lines)
+ ;; move to the end of the xact, no need to search inside it more
(goto-char (cadr bounds))))
(nreverse lines))))
(defun ledger-occur-compress-matches (buffer-matches)
"identify sequential xacts to reduce number of overlays required"
- (if buffer-matches
- (let ((points (list))
- (current-beginning (caar buffer-matches))
- (current-end (cadar buffer-matches)))
- (dolist (match (cdr buffer-matches))
- (if (< (- (car match) current-end) 2)
- (setq current-end (cadr match))
- (push (list current-beginning current-end) points)
- (setq current-beginning (car match))
- (setq current-end (cadr match))))
- (nreverse (push (list current-beginning current-end) points)))))
+ (if buffer-matches
+ (let ((points (list))
+ (current-beginning (caar buffer-matches))
+ (current-end (cadar buffer-matches)))
+ (dolist (match (cdr buffer-matches))
+ (if (< (- (car match) current-end) 2)
+ (setq current-end (cadr match))
+ (push (list current-beginning current-end) points)
+ (setq current-beginning (car match))
+ (setq current-end (cadr match))))
+ (nreverse (push (list current-beginning current-end) points)))))
(provide 'ledger-occur)