Another attempt to deal with decimal-comma
This commit is contained in:
parent
2fd1574cf2
commit
023e245e9b
1 changed files with 4 additions and 3 deletions
|
|
@ -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))))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue