emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r112619: * calc/calc-units.el (math-e


From: Jay Belanger
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112619: * calc/calc-units.el (math-extract-units): Preserve powers of units.
Date: Thu, 16 May 2013 21:57:09 -0500
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112619
committer: Jay Belanger <address@hidden>
branch nick: trunk
timestamp: Thu 2013-05-16 21:57:09 -0500
message:
  * calc/calc-units.el (math-extract-units): Preserve powers of units.
modified:
  lisp/ChangeLog
  lisp/calc/calc-units.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-05-17 02:43:41 +0000
+++ b/lisp/ChangeLog    2013-05-17 02:57:09 +0000
@@ -1,3 +1,8 @@
+2013-05-17  Jay Belanger  <address@hidden>
+
+       * calc/calc-units.el (math-extract-units): Preserve powers
+       of units.
+
 2013-05-17  Leo Liu  <address@hidden>
 
        * subr.el (delete-consecutive-dups): New function.

=== modified file 'lisp/calc/calc-units.el'
--- a/lisp/calc/calc-units.el   2013-04-05 02:20:35 +0000
+++ b/lisp/calc/calc-units.el   2013-05-17 02:57:09 +0000
@@ -1497,10 +1497,8 @@
    ((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)))
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]