summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-units.el
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2013-05-16 21:57:09 -0500
committerJay Belanger <jay.p.belanger@gmail.com>2013-05-16 21:57:09 -0500
commit1db165f042ce2cf467013e314c81ecd16d7aa2c9 (patch)
treecff3ef49b609aaba399f06e76c24097b42b7afca /lisp/calc/calc-units.el
parentc7a8fcacf99548e19b4efcf6900abc66c1de3a9d (diff)
downloademacs-1db165f042ce2cf467013e314c81ecd16d7aa2c9.tar.gz
* calc/calc-units.el (math-extract-units): Preserve powers of units.
Diffstat (limited to 'lisp/calc/calc-units.el')
-rw-r--r--lisp/calc/calc-units.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index 0d6f0b0e535..595d875eb6e 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -1497,10 +1497,8 @@ If COMP or STD is non-nil, put that in the units table instead."
((memq (car-safe expr) '(* /))
(cons (car expr)
(mapcar 'math-extract-units (cdr expr))))
- ((and
- (eq (car-safe expr) '^)
- (math-check-unit-name (nth 1 expr)))
- expr)
+ ((eq (car-safe expr) '^)
+ (list '^ (math-extract-units (nth 1 expr)) (nth 2 expr)))
((math-check-unit-name expr) expr)
(t 1)))