Improved how transactions are cleared in Emacs
If C-c C-c is used on a transaction, it now clears or unclears it, clearing all marks on individual postings when doing so. Fixes 863C0EE8-C193-46EE-9BAA-3A37DE73E4DB
This commit is contained in:
parent
94467e5b7f
commit
a6325388f4
1 changed files with 14 additions and 2 deletions
|
|
@ -413,8 +413,20 @@ dropped."
|
|||
|
||||
(defun ledger-toggle-current (&optional style)
|
||||
(interactive)
|
||||
(if ledger-clear-whole-entries
|
||||
(ledger-toggle-current-entry style)
|
||||
(if (or ledger-clear-whole-entries
|
||||
(eq 'entry (ledger-thing-at-point)))
|
||||
(progn
|
||||
(save-excursion
|
||||
(forward-line)
|
||||
(goto-char (line-beginning-position))
|
||||
(while (and (not (eolp))
|
||||
(save-excursion
|
||||
(not (eq 'entry (ledger-thing-at-point)))))
|
||||
(if (looking-at "\\s-+[*!]")
|
||||
(ledger-toggle-current-transaction nil))
|
||||
(forward-line)
|
||||
(goto-char (line-beginning-position))))
|
||||
(ledger-toggle-current-entry style))
|
||||
(ledger-toggle-current-transaction style)))
|
||||
|
||||
(defvar ledger-mode-abbrev-table)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue