summaryrefslogtreecommitdiff
path: root/ledger.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-26 10:10:16 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-26 10:10:16 -0400
commit00ca034e737c4ae7d2cd3e4df5e61e492e288e46 (patch)
tree37506da4ff612439a809334cf1c9a210a550f91f /ledger.el
parent910f16509699ec6afd51d228d2689aabe8fc1256 (diff)
parent37cf3c6f6e54de338a5d16e0ff7a62754533fe22 (diff)
downloadfork-ledger-00ca034e737c4ae7d2cd3e4df5e61e492e288e46.tar.gz
fork-ledger-00ca034e737c4ae7d2cd3e4df5e61e492e288e46.tar.bz2
fork-ledger-00ca034e737c4ae7d2cd3e4df5e61e492e288e46.zip
Merge branch git://github.com/levindu/ledger.git 'master' into v2.6.1b
Conflicts: Makefile.am
Diffstat (limited to 'ledger.el')
-rw-r--r--ledger.el20
1 files changed, 8 insertions, 12 deletions
diff --git a/ledger.el b/ledger.el
index abdefdfb..6262ec94 100644
--- a/ledger.el
+++ b/ledger.el
@@ -510,14 +510,14 @@ dropped."
(unless (looking-at "[0-9]")
(error (buffer-string)))
(while (not (eobp))
- (setq cleared
- (cons (save-excursion
- (goto-line (1+ (read (current-buffer))))
- (point-marker)) cleared))
+ (push (read (current-buffer)) cleared)
(forward-line)))))
(goto-char (point-min))
(with-current-buffer ledger-buf
- (setq cleared (mapcar 'copy-marker (nreverse cleared))))
+ (setq cleared (mapcar (lambda (line)
+ (goto-line line)
+ (point-marker))
+ (nreverse cleared))))
(let ((inhibit-redisplay t))
(dolist (pos cleared)
(while (and (not (eobp))
@@ -616,13 +616,9 @@ dropped."
(with-current-buffer buf
(cons
(nth 0 item)
- (if ledger-clear-whole-entries
- (save-excursion
- (goto-line (nth 1 item))
- (point-marker))
- (save-excursion
- (goto-line (nth 0 xact))
- (point-marker)))))))
+ (save-excursion
+ (goto-line (nth 0 xact))
+ (point-marker))))))
(insert (format "%s %-30s %-25s %15s\n"
(format-time-string "%m/%d" (nth 2 item))
(nth 4 item) (nth 1 xact) (nth 2 xact)))