aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2015-01-28 21:29:58 -0600
committerJay Belanger2015-01-28 21:29:58 -0600
commit43fdb2a08061afba00243b164111c289d711d976 (patch)
tree3275f3d23a5cb6ed24eaaeeb692793c819f6014a
parentd1cb2f785525ad717a1504f4762505086b390bad (diff)
downloademacs-43fdb2a08061afba00243b164111c289d711d976.tar.gz
emacs-43fdb2a08061afba00243b164111c289d711d976.zip
* lisp/calc/calc-units.el (math-consistent-units-p): Strengthen the
test for consistent units.
-rw-r--r--lisp/ChangeLog1
-rw-r--r--lisp/calc/calc-units.el2
2 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4d7f2f75e57..bc1d1478fe7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,7 @@
2 2
3 * lisp/calc/calc-units.el (calc-convert-exact-units): New function. 3 * lisp/calc/calc-units.el (calc-convert-exact-units): New function.
4 (calc-convert-units): Check for missing units. 4 (calc-convert-units): Check for missing units.
5 (math-consistent-units-p): Strengthen the test for consistent units.
5 6
6 * lisp/calc/calc-ext.el (calc-init-extensions): Autoload 7 * lisp/calc/calc-ext.el (calc-init-extensions): Autoload
7 `calc-convert-exact-units' and assign it a keybinding. 8 `calc-convert-exact-units' and assign it a keybinding.
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index 8442cf9ff25..33cbcac7a2d 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -979,7 +979,7 @@ If COMP or STD is non-nil, put that in the units table instead."
979 (or 979 (or
980 (and (eq (car-safe newunits) 'var) 980 (and (eq (car-safe newunits) 'var)
981 (assq (nth 1 newunits) math-standard-units-systems)) 981 (assq (nth 1 newunits) math-standard-units-systems))
982 (math-numberp (math-get-units (list '/ expr newunits))))) 982 (math-numberp (math-get-units (math-to-standard-units (list '/ expr newunits) nil)))))
983 983
984(defun math-check-unit-consistency (expr units) 984(defun math-check-unit-consistency (expr units)
985 "Give an error if EXPR and UNITS do not have consistent units." 985 "Give an error if EXPR and UNITS do not have consistent units."