(calc-quick-units): Fix overzealous s/or/unless.
This commit is contained in:
parent
dc711054e2
commit
91af11b2a3
1 changed files with 3 additions and 3 deletions
|
@ -297,11 +297,11 @@ Entries are (SYMBOL EXPR DOC-STRING TEMP-TYPE BASE-UNITS).")
|
|||
(units (calc-var-value 'var-Units))
|
||||
(expr (calc-top-n 1)))
|
||||
(unless (and (>= num 0) (<= num 9))
|
||||
(errunless "Bad unit number"))
|
||||
(error "Bad unit number"))
|
||||
(unless (math-vectorp units)
|
||||
(errunless "No \"quick units\" are defined"))
|
||||
(error "No \"quick units\" are defined"))
|
||||
(unless (< pos (length units))
|
||||
(errunless "Unit number %d not defined" pos))
|
||||
(error "Unit number %d not defined" pos))
|
||||
(if (math-units-in-expr-p expr nil)
|
||||
(calc-enter-result 1 (format "cun%d" num)
|
||||
(math-convert-units expr (nth pos units)))
|
||||
|
|
Loading…
Add table
Reference in a new issue