diff options
author | Craig Earls <enderw88@gmail.com> | 2013-02-21 14:35:29 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2013-02-21 14:35:29 -0700 |
commit | 023e245e9b942968a5c61e494c28de2823b2a222 (patch) | |
tree | bbcf418f3248b17a83c01d77a32681815a55991a | |
parent | 2fd1574cf2e969c7da7bf346837d859ac6ae90c9 (diff) | |
download | fork-ledger-023e245e9b942968a5c61e494c28de2823b2a222.tar.gz fork-ledger-023e245e9b942968a5c61e494c28de2823b2a222.tar.bz2 fork-ledger-023e245e9b942968a5c61e494c28de2823b2a222.zip |
Another attempt to deal with decimal-comma
-rw-r--r-- | lisp/ldg-commodities.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/ldg-commodities.el b/lisp/ldg-commodities.el index 1b6b332a..c832f375 100644 --- a/lisp/ldg-commodities.el +++ b/lisp/ldg-commodities.el @@ -44,13 +44,14 @@ This only has effect interfacing to calc mode in edit amount" (with-temp-buffer (insert str) (goto-char (point-min)) - (re-search-forward "-?[1-9][0-9]*[.,][0-9]*") + (re-search-forward "-?[1-9][0-9]*[.,][0-9]*" nil t) (setq val (string-to-number (ledger-commodity-string-number-decimalize (delete-and-extract-region (match-beginning 0) (match-end 0)) :from-user))) - (delete-trailing-whitespace) - (setq comm (buffer-substring (point-min) (point-max))) + (re-search-forward "[^[:space:]]" nil t) + (setq comm + (delete-and-extract-region (match-beginning 0) (match-end 0))) (list val comm)))) |