diff options
Diffstat (limited to 'lisp/ledger-commodities.el')
-rw-r--r-- | lisp/ledger-commodities.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/ledger-commodities.el b/lisp/ledger-commodities.el index 865305d6..aed3f6c1 100644 --- a/lisp/ledger-commodities.el +++ b/lisp/ledger-commodities.el @@ -117,11 +117,11 @@ Returns a list with (value commodity)." (defun ledger-number-to-string (n &optional decimal-comma) (let ((str (number-to-string n))) - (if (or decimal-comma - (assoc "decimal-comma" ledger-environment-alist)) - (while (string-match "\\." str) - (setq str (replace-match "," nil nil str))) - str))) + (when (or decimal-comma + (assoc "decimal-comma" ledger-environment-alist)) + (while (string-match "\\." str) + (setq str (replace-match "," nil nil str)))) + str)) (defun ledger-commodity-to-string (c1) "Return string representing C1. |