From e961ce5f6a7cbff1883041de31d6f9077a652865 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 9 Feb 2005 21:58:25 +0000 Subject: (ledger-reconcile): Added back the feature that C-u C-c C-r will assume that an auto-reconcile is to be attempted. --- ledger.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ledger.el b/ledger.el index f957368c..f41f0a0c 100644 --- a/ledger.el +++ b/ledger.el @@ -269,8 +269,8 @@ Return the difference in the format of a time value." (set-buffer-modified-p nil) (ledger-display-balance)) -(defun ledger-reconcile (account) - (interactive "sAccount to reconcile: ") +(defun ledger-reconcile (account &optional arg) + (interactive "sAccount to reconcile: \nP") (let* ((buf (current-buffer)) (items (with-temp-buffer @@ -300,7 +300,10 @@ Return the difference in the format of a time value." (list 'where (nth 0 item))))))) (goto-char (point-min)) (set-buffer-modified-p nil) - (toggle-read-only t)))) + (toggle-read-only t) + (when arg + (sit-for 0 0) + (call-interactively #'ledger-auto-reconcile))))) (defvar ledger-reconcile-mode-abbrev-table) @@ -310,6 +313,8 @@ Return the difference in the format of a time value." (define-key map [(control ?c) (control ?r)] 'ledger-auto-reconcile) (define-key map [(control ?x) (control ?s)] 'ledger-reconcile-save) (define-key map [? ] 'ledger-reconcile-toggle) + (define-key map [?r] 'ledger-auto-reconcile) + (define-key map [?s] 'ledger-reconcile-save) (define-key map [?q] (function (lambda () -- cgit v1.2.3