From e1b2c21b431accc397219b432a76a716acc6dbc2 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 20 Nov 2018 10:37:46 -0500 Subject: * lisp/calc/calc-alg.el: Use lexical-binding and silence warnings * lisp/calc/calc-alg.el: Use lexical-binding and silence warnings. (math-defsimplify): Let-bind 'expr' instead of math-simplify-expr. Adjust all users. (math-simplify-expr): Don't declare any more. (math--simplify-divide-expr): New dynbound var. (math-simplify-divide): Bind it when needed. (math-simplify-divisor): Use it instead of math-simplify-expr. (math-simplify-divisor): Only bind math-simplify-divisor-[nd]over around the calls to math-simplify-one-divisor. (math-expr-subst, math-is-polynomial): Don't use dynbound vars as formal arguments. (math-polynomial-base): Move binding of math-poly-base-pred. Don't bind math-poly-base-top-expr any more... * lisp/calc/calc-poly.el (math-total-polynomial-base): Bind it here instead! * lisp/calc/calc-units.el: Use lexical-binding and silence warnings. Adjust to the new 'expr' name in math-defsimplify. (math-find-base-units, math-to-standard-units, math-convert-units): Don't use dynbound vars as formal arguments. (math-simplify-expr): Don't declare any more. --- lisp/calc/calc-poly.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp/calc/calc-poly.el') diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el index 64f221e7a00..4092aeec529 100644 --- a/lisp/calc/calc-poly.el +++ b/lisp/calc/calc-poly.el @@ -517,8 +517,9 @@ (defvar math-poly-base-total-base) (defun math-total-polynomial-base (expr) - (let ((math-poly-base-total-base nil)) - (math-polynomial-base expr 'math-polynomial-p1) + (let ((math-poly-base-total-base nil) + (math-poly-base-top-expr expr)) + (math-polynomial-base expr #'math-polynomial-p1) (math-sort-poly-base-list math-poly-base-total-base))) ;; The variable math-poly-base-top-expr is local to math-polynomial-base -- cgit v1.2.3