Commit e1b2c21b authored by Stefan Monnier's avatar Stefan Monnier

* 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.
parent 5007c23a
Pipeline #100 failed with stage
in 21 minutes and 47 seconds
This diff is collapsed.
...@@ -714,8 +714,8 @@ ...@@ -714,8 +714,8 @@
;;;; (Autoloads here) ;;;; (Autoloads here)
(mapc (function (lambda (x) (mapc (function (lambda (x)
(mapcar (function (lambda (func) (mapcar (function (lambda (func) (autoload func (car x))))
(autoload func (car x)))) (cdr x)))) (cdr x))))
'( '(
("calc-alg" calc-has-rules math-defsimplify ("calc-alg" calc-has-rules math-defsimplify
......
...@@ -517,8 +517,9 @@ ...@@ -517,8 +517,9 @@
(defvar math-poly-base-total-base) (defvar math-poly-base-total-base)
(defun math-total-polynomial-base (expr) (defun math-total-polynomial-base (expr)
(let ((math-poly-base-total-base nil)) (let ((math-poly-base-total-base nil)
(math-polynomial-base expr 'math-polynomial-p1) (math-poly-base-top-expr expr))
(math-polynomial-base expr #'math-polynomial-p1)
(math-sort-poly-base-list math-poly-base-total-base))) (math-sort-poly-base-list math-poly-base-total-base)))
;; The variable math-poly-base-top-expr is local to math-polynomial-base ;; The variable math-poly-base-top-expr is local to math-polynomial-base
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment