]> git.eshelyaron.com Git - emacs.git/commitdiff
* calc/calc-units.el (math-extract-units): Preserve powers of units.
authorJay Belanger <jay.p.belanger@gmail.com>
Fri, 17 May 2013 02:57:09 +0000 (21:57 -0500)
committerJay Belanger <jay.p.belanger@gmail.com>
Fri, 17 May 2013 02:57:09 +0000 (21:57 -0500)
lisp/ChangeLog
lisp/calc/calc-units.el

index 4a060875e3c1dd7a5eea676adab09f486d8d96bb..531ef52a9969f77be5ff81a75951838197cda05c 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-17  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * calc/calc-units.el (math-extract-units): Preserve powers
+       of units.
+
 2013-05-17  Leo Liu  <sdl.web@gmail.com>
 
        * subr.el (delete-consecutive-dups): New function.
index 0d6f0b0e535df30a33fd9e30eb9a60102c6650a7..595d875eb6ea71fce157a16ac5c48586d1a7da46 100644 (file)
@@ -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)))