Change ledger-next-amount to be case-sensitive

Otherwise if there is an account that's name only has one part, the
regex can match it as a currency and as the beginning of an amount.
E.g. if we have the line "Expenses         45 USD", then the old
ledger-next-amount will jump to Expenses instead of to 45.
This commit is contained in:
Gergely Risko 2013-07-12 01:07:25 +02:00
parent 78e65ee4ab
commit 515ae05d6b

View file

@ -117,11 +117,12 @@ to choose from."
Return the width of the amount field as an integer and leave
point at beginning of the commodity."
;;(beginning-of-line)
(when (re-search-forward ledger-amount-regex end t)
(goto-char (match-beginning 0))
(skip-syntax-forward " ")
(- (or (match-end 4)
(match-end 3)) (point))))
(let ((case-fold-search nil))
(when (re-search-forward ledger-amount-regex end t)
(goto-char (match-beginning 0))
(skip-syntax-forward " ")
(- (or (match-end 4)
(match-end 3)) (point)))))
(defun ledger-next-account (&optional end)