]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/calc/calc-units.el (math-consistent-units-p): Strengthen the
authorJay Belanger <jay.p.belanger@gmail.com>
Thu, 29 Jan 2015 03:29:58 +0000 (21:29 -0600)
committerJay Belanger <jay.p.belanger@gmail.com>
Thu, 29 Jan 2015 03:29:58 +0000 (21:29 -0600)
  test for consistent units.

lisp/ChangeLog
lisp/calc/calc-units.el

index 4d7f2f75e5746c1490bc0717298495bbff76a14b..bc1d1478fe78f3a4aee8ae43a2c566d7ab483d1f 100644 (file)
@@ -2,6 +2,7 @@
 
        * lisp/calc/calc-units.el (calc-convert-exact-units): New function.
        (calc-convert-units): Check for missing units.
+       (math-consistent-units-p): Strengthen the test for consistent units.
 
        * lisp/calc/calc-ext.el (calc-init-extensions):  Autoload
        `calc-convert-exact-units' and assign it a keybinding.
index 8442cf9ff25bec8f35fb1822018c1692a264f791..33cbcac7a2db33bee6b7239e3afa3369f4bc7c1b 100644 (file)
@@ -979,7 +979,7 @@ If COMP or STD is non-nil, put that in the units table instead."
   (or
    (and (eq (car-safe newunits) 'var)
         (assq (nth 1 newunits) math-standard-units-systems))
-   (math-numberp (math-get-units (list '/ expr newunits)))))
+   (math-numberp (math-get-units (math-to-standard-units (list '/ expr newunits) nil)))))
 
 (defun math-check-unit-consistency (expr units)
   "Give an error if EXPR and UNITS do not have consistent units."