summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-02-15 12:43:56 -0700
committerCraig Earls <enderw88@gmail.com>2013-02-15 12:43:56 -0700
commitd37a369c12f0f29bc00d87bb7ef75347c6c5dffe (patch)
treef0b71bdfe645939c0fe3fd854ae13156e6920733
parentadfb03cac0d07ede80ad8603eaa15b145ac4f1ef (diff)
downloadfork-ledger-d37a369c12f0f29bc00d87bb7ef75347c6c5dffe.tar.gz
fork-ledger-d37a369c12f0f29bc00d87bb7ef75347c6c5dffe.tar.bz2
fork-ledger-d37a369c12f0f29bc00d87bb7ef75347c6c5dffe.zip
Changed prompt for reconciliation target.
-rw-r--r--lisp/ldg-commodities.el7
-rw-r--r--lisp/ldg-reconcile.el6
2 files changed, 6 insertions, 7 deletions
diff --git a/lisp/ldg-commodities.el b/lisp/ldg-commodities.el
index ab5c8898..cf2ee128 100644
--- a/lisp/ldg-commodities.el
+++ b/lisp/ldg-commodities.el
@@ -69,12 +69,11 @@ longer one are after the value."
(concat val " " commodity)
(concat commodity " " val))))
-(defun ledger-read-commodity-string (comm)
+(defun ledger-read-commodity-string (prompt)
"Return a commoditizd value (val 'comm') from COMM.
Assumes a space between the value and the commodity."
- (interactive (list (read-from-minibuffer
- (concat "Enter commoditized amount (" ledger-reconcile-default-commodity "): "))))
- (let ((parts (split-string comm)))
+ (let ((parts (split-string (read-from-minibuffer
+ (concat prompt " (" ledger-reconcile-default-commodity "): ")))))
(if parts
(if (/= (length parts) 2) ;;assume a number was entered and use default commodity
(list (string-to-number (car parts))
diff --git a/lisp/ldg-reconcile.el b/lisp/ldg-reconcile.el
index 373b3de9..58cb6626 100644
--- a/lisp/ldg-reconcile.el
+++ b/lisp/ldg-reconcile.el
@@ -360,7 +360,7 @@ POSTING is used in `ledger-clear-whole-transactions' is nil."
(ledger-occur-change-regex account ledger-buf))
(set-buffer (get-buffer ledger-recon-buffer-name))
(setq ledger-target
- (call-interactively #'ledger-read-commodity-string))
+ (ledger-read-commodity-string "Set reconciliation target"))
(unless (get-buffer-window rbuf)
(ledger-reconcile-open-windows buf rbuf))
(ledger-reconcile-refresh)
@@ -377,7 +377,7 @@ POSTING is used in `ledger-clear-whole-transactions' is nil."
(set (make-local-variable 'ledger-buf) buf)
(set (make-local-variable 'ledger-acct) account)
(set (make-local-variable 'ledger-target)
- (call-interactively #'ledger-read-commodity-string))
+ (ledger-read-commodity-string "Set reconciliation target"))
(ledger-do-reconcile))))))
(defvar ledger-reconcile-mode-abbrev-table)
@@ -385,7 +385,7 @@ POSTING is used in `ledger-clear-whole-transactions' is nil."
(defun ledger-reconcile-change-target ()
"Change the traget amount for the reconciliation process."
(interactive)
- (setq ledger-target (call-interactively #'ledger-read-commodity-string)))
+ (setq ledger-target (ledger-read-commodity-string "Set reconciliation target")))
(define-derived-mode ledger-reconcile-mode text-mode "Reconcile"
"A mode for reconciling ledger entries."