aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2013-05-16 21:57:09 -0500
committerJay Belanger2013-05-16 21:57:09 -0500
commit1db165f042ce2cf467013e314c81ecd16d7aa2c9 (patch)
treecff3ef49b609aaba399f06e76c24097b42b7afca
parentc7a8fcacf99548e19b4efcf6900abc66c1de3a9d (diff)
downloademacs-1db165f042ce2cf467013e314c81ecd16d7aa2c9.tar.gz
emacs-1db165f042ce2cf467013e314c81ecd16d7aa2c9.zip
* calc/calc-units.el (math-extract-units): Preserve powers of units.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calc/calc-units.el6
2 files changed, 7 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4a060875e3c..531ef52a996 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-05-17 Jay Belanger <jay.p.belanger@gmail.com>
2
3 * calc/calc-units.el (math-extract-units): Preserve powers
4 of units.
5
12013-05-17 Leo Liu <sdl.web@gmail.com> 62013-05-17 Leo Liu <sdl.web@gmail.com>
2 7
3 * subr.el (delete-consecutive-dups): New function. 8 * subr.el (delete-consecutive-dups): New function.
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."
1497 ((memq (car-safe expr) '(* /)) 1497 ((memq (car-safe expr) '(* /))
1498 (cons (car expr) 1498 (cons (car expr)
1499 (mapcar 'math-extract-units (cdr expr)))) 1499 (mapcar 'math-extract-units (cdr expr))))
1500 ((and 1500 ((eq (car-safe expr) '^)
1501 (eq (car-safe expr) '^) 1501 (list '^ (math-extract-units (nth 1 expr)) (nth 2 expr)))
1502 (math-check-unit-name (nth 1 expr)))
1503 expr)
1504 ((math-check-unit-name expr) expr) 1502 ((math-check-unit-name expr) expr)
1505 (t 1))) 1503 (t 1)))
1506 1504