summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-units.el
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2008-09-17 02:25:37 +0000
committerJay Belanger <jay.p.belanger@gmail.com>2008-09-17 02:25:37 +0000
commita17e99488a35970c95cbb3121de479aa6a0428b8 (patch)
tree1d2e32281d35c6e6aac55703181807bb4212699f /lisp/calc/calc-units.el
parent69c1b3b8ba24692b6911554628cb506611cb17f0 (diff)
downloademacs-a17e99488a35970c95cbb3121de479aa6a0428b8.tar.gz
(calc-convert-temperature): Use default units when appropriate.
Diffstat (limited to 'lisp/calc/calc-units.el')
-rw-r--r--lisp/calc/calc-units.el26
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index 9ada7e31e34..8ba6465e902 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -473,19 +473,19 @@ If EXPR is nil, return nil."
(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)