summaryrefslogtreecommitdiff
path: root/lisp/ledger-post.el
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2014-06-25 20:50:07 -0700
committerCraig Earls <enderw88@gmail.com>2014-06-25 20:50:07 -0700
commit3a2eb94beff65f22463c119e4db55a2962ac02e0 (patch)
tree53c21914b68ab5ba7256ce6e4fa83829c0316cd6 /lisp/ledger-post.el
parent10bdcbb876227047763d5656bf9a93af624aaf31 (diff)
downloadfork-ledger-3a2eb94beff65f22463c119e4db55a2962ac02e0.tar.gz
fork-ledger-3a2eb94beff65f22463c119e4db55a2962ac02e0.tar.bz2
fork-ledger-3a2eb94beff65f22463c119e4db55a2962ac02e0.zip
Fix bug 1052 ledger-mode mangles transactions with tabs.
Diffstat (limited to 'lisp/ledger-post.el')
-rw-r--r--lisp/ledger-post.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ledger-post.el b/lisp/ledger-post.el
index 2709a5e3..ea718f9d 100644
--- a/lisp/ledger-post.el
+++ b/lisp/ledger-post.el
@@ -163,7 +163,16 @@ region align the posting on the current line."
(if mark-first (point) (mark))))
acct-start-column acct-end-column acct-adjust amt-width
(lines-left 1))
- ;; Condition point and mark to the beginning and end of lines
+ ;; Condition point and mark to the beginning and end of lines
+ (goto-char end-region)
+ (setq end-region (line-end-position))
+ (goto-char begin-region)
+ (goto-char
+ (setq begin-region
+ (line-beginning-position)))
+
+ (untabify begin-region end-region)
+
(goto-char end-region)
(setq end-region (line-end-position))
(goto-char begin-region)