diff options
author | Jay Belanger <jay.p.belanger@gmail.com> | 2013-05-16 21:57:09 -0500 |
---|---|---|
committer | Jay Belanger <jay.p.belanger@gmail.com> | 2013-05-16 21:57:09 -0500 |
commit | 1db165f042ce2cf467013e314c81ecd16d7aa2c9 (patch) | |
tree | cff3ef49b609aaba399f06e76c24097b42b7afca /lisp/calc | |
parent | c7a8fcacf99548e19b4efcf6900abc66c1de3a9d (diff) | |
download | emacs-1db165f042ce2cf467013e314c81ecd16d7aa2c9.tar.gz emacs-1db165f042ce2cf467013e314c81ecd16d7aa2c9.tar.bz2 emacs-1db165f042ce2cf467013e314c81ecd16d7aa2c9.zip |
* calc/calc-units.el (math-extract-units): Preserve powers of units.
Diffstat (limited to 'lisp/calc')
-rw-r--r-- | lisp/calc/calc-units.el | 6 |
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))) |