diff options
| author | Jay Belanger | 2013-05-16 21:57:09 -0500 |
|---|---|---|
| committer | Jay Belanger | 2013-05-16 21:57:09 -0500 |
| commit | 1db165f042ce2cf467013e314c81ecd16d7aa2c9 (patch) | |
| tree | cff3ef49b609aaba399f06e76c24097b42b7afca | |
| parent | c7a8fcacf99548e19b4efcf6900abc66c1de3a9d (diff) | |
| download | emacs-1db165f042ce2cf467013e314c81ecd16d7aa2c9.tar.gz emacs-1db165f042ce2cf467013e314c81ecd16d7aa2c9.zip | |
* calc/calc-units.el (math-extract-units): Preserve powers of units.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/calc/calc-units.el | 6 |
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 @@ | |||
| 1 | 2013-05-17 Jay Belanger <jay.p.belanger@gmail.com> | ||
| 2 | |||
| 3 | * calc/calc-units.el (math-extract-units): Preserve powers | ||
| 4 | of units. | ||
| 5 | |||
| 1 | 2013-05-17 Leo Liu <sdl.web@gmail.com> | 6 | 2013-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 | ||