Mercurial > emacs
changeset 98201:1d82f8f9b231
(calc-convert-temperature): Use default units when appropriate.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Wed, 17 Sep 2008 02:25:37 +0000 |
parents | 4f3b2bef6df0 |
children | b6cf257b02c1 |
files | lisp/calc/calc-units.el |
diffstat | 1 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calc/calc-units.el Wed Sep 17 00:55:38 2008 +0000 +++ b/lisp/calc/calc-units.el Wed Sep 17 02:25:37 2008 +0000 @@ -473,19 +473,19 @@ (setq expr (math-mul expr uold))) (setq defunits (math-get-default-units expr)) (setq unew (or new-units - (math-read-expr - (read-string - (concat - (if uoldname - (concat "Old temperature units: " - uoldname - ", new units") - "New temperature units") - (if defunits - (concat " (default " - defunits - "): ") - ": ")))))) + (read-string + (concat + (if uoldname + (concat "Old temperature units: " + uoldname + ", new units") + "New temperature units") + (if defunits + (concat " (default " + defunits + "): ") + ": "))))) + (setq unew (math-read-expr (if (string= unew "") defunits unew))) (when (eq (car-safe unew) 'error) (error "Bad format in units expression: %s" (nth 2 unew))) (math-put-default-units unew)