summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-poly.el
diff options
context:
space:
mode:
authorColin Walters <walters@gnu.org>2001-11-19 07:44:56 +0000
committerColin Walters <walters@gnu.org>2001-11-19 07:44:56 +0000
commit3132f345bc1ab68e4425178266e3d4ad1b2ccd02 (patch)
tree43339ccf578fb555b44dd0c84aa0e7b0389dc8b0 /lisp/calc/calc-poly.el
parentf269b73e3ea3de8c539d544fd0310b63fc029f20 (diff)
downloademacs-3132f345bc1ab68e4425178266e3d4ad1b2ccd02.tar.gz
emacs-3132f345bc1ab68e4425178266e3d4ad1b2ccd02.tar.bz2
emacs-3132f345bc1ab68e4425178266e3d4ad1b2ccd02.zip
Change all toplevel `setq' forms to `defvar' forms, and move them
before their first use. Use `when', `unless'. Remove trailing periods from error forms. Add description and headers suggested by Emacs Lisp coding conventions.
Diffstat (limited to 'lisp/calc/calc-poly.el')
-rw-r--r--lisp/calc/calc-poly.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el
index c2dfd71f69a..acb5d34ea50 100644
--- a/lisp/calc/calc-poly.el
+++ b/lisp/calc/calc-poly.el
@@ -1,6 +1,9 @@
-;; Calculator for GNU Emacs, part II [calc-poly.el]
+;;; calc-poly.el --- polynomial functions for Calc
+
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
-;; Written by Dave Gillespie, daveg@synaptics.com.
+
+;; Author: David Gillespie <daveg@synaptics.com>
+;; Maintainer: Colin Walters <walters@debian.org>
;; This file is part of GNU Emacs.
@@ -19,7 +22,9 @@
;; file named COPYING. Among other things, the copyright notice
;; and this notice must be preserved on all copies.
+;;; Commentary:
+;;; Code:
;; This file is autoloaded from calc-ext.el.
(require 'calc-ext)
@@ -133,7 +138,7 @@
;;; Originally by Ove Ewerlid (ewerlid@mizar.DoCS.UU.SE).
;;; Modifications and simplifications by daveg.
-(setq math-poly-modulus 1)
+(defvar math-poly-modulus 1)
;;; Return gcd of two polynomials
(defun calcFunc-pgcd (pn pd)
@@ -233,11 +238,11 @@
;;; Divide two polynomials. Return (quotient . remainder).
+(defvar math-poly-div-base nil)
(defun math-poly-div (u v &optional math-poly-div-base)
(if math-poly-div-base
(math-do-poly-div u v)
(math-do-poly-div (calcFunc-expand u) (calcFunc-expand v))))
-(setq math-poly-div-base nil)
(defun math-poly-div-exact (u v &optional base)
(let ((res (math-poly-div u v base)))