aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2008-09-17 02:25:37 +0000
committerJay Belanger2008-09-17 02:25:37 +0000
commitfa786329aacadadc44b512fb761329123fa16c17 (patch)
tree0370397d28a5b6822175d0fda51834f858d12c76
parentf768e8e8c9be33c72dd5768daa11a21cfa580252 (diff)
downloademacs-fa786329aacadadc44b512fb761329123fa16c17.tar.gz
emacs-fa786329aacadadc44b512fb761329123fa16c17.zip
(calc-convert-temperature): Use default units when appropriate.
-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."
473 (setq expr (math-mul expr uold))) 473 (setq expr (math-mul expr uold)))
474 (setq defunits (math-get-default-units expr)) 474 (setq defunits (math-get-default-units expr))
475 (setq unew (or new-units 475 (setq unew (or new-units
476 (math-read-expr 476 (read-string
477 (read-string 477 (concat
478 (concat 478 (if uoldname
479 (if uoldname 479 (concat "Old temperature units: "
480 (concat "Old temperature units: " 480 uoldname
481 uoldname 481 ", new units")
482 ", new units") 482 "New temperature units")
483 "New temperature units") 483 (if defunits
484 (if defunits 484 (concat " (default "
485 (concat " (default " 485 defunits
486 defunits 486 "): ")
487 "): ") 487 ": ")))))
488 ": ")))))) 488 (setq unew (math-read-expr (if (string= unew "") defunits unew)))
489 (when (eq (car-safe unew) 'error) 489 (when (eq (car-safe unew) 'error)
490 (error "Bad format in units expression: %s" (nth 2 unew))) 490 (error "Bad format in units expression: %s" (nth 2 unew)))
491 (math-put-default-units unew) 491 (math-put-default-units unew)