From 4c4861ead407b3ae65c47ac88084adc42bde1011 Mon Sep 17 00:00:00 2001 From: Preston Hunt Date: Sat, 2 Oct 2021 11:12:31 -0700 Subject: [PATCH] Add ledger-comment-or-uncomment-current-transaction --- ledger-xact.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ledger-xact.el b/ledger-xact.el index ff4bb421..bb49990b 100644 --- a/ledger-xact.el +++ b/ledger-xact.el @@ -174,6 +174,12 @@ MOMENT is an encoded date" (delete-region (car bounds) (cadr bounds))) (delete-blank-lines)) +(defun ledger-comment-or-uncomment-current-transaction (pos) + "Comment or uncomment the transaction surrounging POS." + (interactive "d") + (let ((bounds (ledger-navigate-find-element-extents pos))) + (comment-or-uncomment-region (car bounds) (cadr bounds)))) + (defvar ledger-add-transaction-last-date nil "Last date entered using `ledger-read-transaction'.")