Merge pull request #431 from Fuco1/add-dwim-align
Add dwim align Thank you.
This commit is contained in:
commit
5f2f8e50b3
2 changed files with 8 additions and 0 deletions
|
|
@ -285,6 +285,7 @@ With a prefix argument, remove the effective date."
|
|||
|
||||
(define-key map [(meta ?p)] 'ledger-navigate-prev-xact-or-directive)
|
||||
(define-key map [(meta ?n)] 'ledger-navigate-next-xact-or-directive)
|
||||
(define-key map [(meta ?q)] 'ledger-post-align-dwim)
|
||||
map)
|
||||
"Keymap for `ledger-mode'.")
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue