1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

* calc/calc-units.el (math-extract-units): Preserve powers of units.

This commit is contained in:
Jay Belanger 2013-05-16 21:57:09 -05:00
parent c7a8fcacf9
commit 1db165f042
2 changed files with 7 additions and 4 deletions

View 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.

View 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)))