summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ledger-post.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/ledger-post.el b/lisp/ledger-post.el
index 21e856db..f648ea8f 100644
--- a/lisp/ledger-post.el
+++ b/lisp/ledger-post.el
@@ -146,6 +146,13 @@ at beginning of account"
(setq lines-left (not (eobp)))))
(setq inhibit-modification-hooks nil))))
+(defun ledger-post-align-dwim ()
+ "Align all the posting of the current xact the current region."
+ (interactive)
+ (if (use-region-p)
+ (call-interactively 'ledger-post-align-postings)
+ (call-interactively 'ledger-post-align-xact)))
+
(defun ledger-post-edit-amount ()
"Call 'calc-mode' and push the amount in the posting to the top of stack."
(interactive)