(ledger-reconcile): Added back the feature that C-u C-c C-r will
assume that an auto-reconcile is to be attempted.
This commit is contained in:
parent
88042027e7
commit
e961ce5f6a
1 changed files with 8 additions and 3 deletions
11
ledger.el
11
ledger.el
|
|
@ -269,8 +269,8 @@ Return the difference in the format of a time value."
|
||||||
(set-buffer-modified-p nil)
|
(set-buffer-modified-p nil)
|
||||||
(ledger-display-balance))
|
(ledger-display-balance))
|
||||||
|
|
||||||
(defun ledger-reconcile (account)
|
(defun ledger-reconcile (account &optional arg)
|
||||||
(interactive "sAccount to reconcile: ")
|
(interactive "sAccount to reconcile: \nP")
|
||||||
(let* ((buf (current-buffer))
|
(let* ((buf (current-buffer))
|
||||||
(items
|
(items
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
|
|
@ -300,7 +300,10 @@ Return the difference in the format of a time value."
|
||||||
(list 'where (nth 0 item)))))))
|
(list 'where (nth 0 item)))))))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(set-buffer-modified-p nil)
|
(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)
|
(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 ?c) (control ?r)] 'ledger-auto-reconcile)
|
||||||
(define-key map [(control ?x) (control ?s)] 'ledger-reconcile-save)
|
(define-key map [(control ?x) (control ?s)] 'ledger-reconcile-save)
|
||||||
(define-key map [? ] 'ledger-reconcile-toggle)
|
(define-key map [? ] 'ledger-reconcile-toggle)
|
||||||
|
(define-key map [?r] 'ledger-auto-reconcile)
|
||||||
|
(define-key map [?s] 'ledger-reconcile-save)
|
||||||
(define-key map [?q]
|
(define-key map [?q]
|
||||||
(function
|
(function
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue