changeset 58106:54e2af9e210d

(math-read-brackets, math-read-vector, math-read-matrix): Use declared variable math-expr-data.
author Jay Belanger <jay.p.belanger@gmail.com>
date Tue, 09 Nov 2004 20:31:40 +0000
parents bd86240a57e9
children cfad3432f125
files lisp/calc/calc-vec.el
diffstat 1 files changed, 22 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc-vec.el	Tue Nov 09 20:31:12 2004 +0000
+++ b/lisp/calc/calc-vec.el	Tue Nov 09 20:31:40 2004 +0000
@@ -1468,7 +1468,7 @@
   (math-read-token)
   (while (eq exp-token 'space)
     (math-read-token))
-  (if (or (equal exp-data close)
+  (if (or (equal math-expr-data close)
 	  (eq exp-token 'end))
       (progn
 	(math-read-token)
@@ -1476,10 +1476,10 @@
     (let ((save-exp-pos exp-pos)
 	  (save-exp-old-pos exp-old-pos)
 	  (save-exp-token exp-token)
-	  (save-exp-data exp-data)
+	  (save-exp-data math-expr-data)
 	  (vals (let ((exp-keep-spaces space-sep))
-		  (if (or (equal exp-data "\\dots")
-			  (equal exp-data "\\ldots"))
+		  (if (or (equal math-expr-data "\\dots")
+			  (equal math-expr-data "\\ldots"))
 		      '(vec (neg (var inf var-inf)))
 		    (catch 'syntax (math-read-vector))))))
       (if (stringp vals)
@@ -1490,12 +1490,12 @@
 		(setq exp-pos save-exp-pos
 		      exp-old-pos save-exp-old-pos
 		      exp-token save-exp-token
-		      exp-data save-exp-data)
+		      math-expr-data save-exp-data)
 		(let ((exp-keep-spaces nil))
 		  (setq vals2 (catch 'syntax (math-read-vector))))
 		(if (and (not (stringp vals2))
-			 (or (assoc exp-data '(("\\ldots") ("\\dots") (";")))
-			     (equal exp-data close)
+			 (or (assoc math-expr-data '(("\\ldots") ("\\dots") (";")))
+			     (equal math-expr-data close)
 			     (eq exp-token 'end)))
 		    (setq space-sep nil
 			  vals vals2)
@@ -1503,30 +1503,30 @@
 			exp-old-pos error-exp-old-pos)
 		  (throw 'syntax vals)))
 	    (throw 'syntax vals)))
-      (if (or (equal exp-data "\\dots")
-	      (equal exp-data "\\ldots"))
+      (if (or (equal math-expr-data "\\dots")
+	      (equal math-expr-data "\\ldots"))
 	  (progn
 	    (math-read-token)
 	    (setq vals (if (> (length vals) 2)
 			   (cons 'calcFunc-mul (cdr vals)) (nth 1 vals)))
-	    (let ((exp2 (if (or (equal exp-data close)
-				(equal exp-data ")")
+	    (let ((exp2 (if (or (equal math-expr-data close)
+				(equal math-expr-data ")")
 				(eq exp-token 'end))
 			    '(var inf var-inf)
 			  (math-read-expr-level 0))))
 	      (setq vals
 		    (list 'intv
-			  (if (equal exp-data ")") 2 3)
+			  (if (equal math-expr-data ")") 2 3)
 			  vals
 			  exp2)))
-	    (if (not (or (equal exp-data close)
-			 (equal exp-data ")")
+	    (if (not (or (equal math-expr-data close)
+			 (equal math-expr-data ")")
 			 (eq exp-token 'end)))
 		(throw 'syntax "Expected `]'")))
-	(if (equal exp-data ";")
+	(if (equal math-expr-data ";")
 	    (let ((exp-keep-spaces space-sep))
 	      (setq vals (cons 'vec (math-read-matrix (list vals))))))
-	(if (not (or (equal exp-data close)
+	(if (not (or (equal math-expr-data close)
 		     (eq exp-token 'end)))
 	    (throw 'syntax "Expected `]'")))
       (or (eq exp-token 'end)
@@ -1556,11 +1556,11 @@
 	     (while (eq exp-token 'space)
 	       (math-read-token))
 	     (and (not (eq exp-token 'end))
-		  (not (equal exp-data ";"))
-		  (not (equal exp-data close))
-		  (not (equal exp-data "\\dots"))
-		  (not (equal exp-data "\\ldots"))))
-      (if (equal exp-data ",")
+		  (not (equal math-expr-data ";"))
+		  (not (equal math-expr-data close))
+		  (not (equal math-expr-data "\\dots"))
+		  (not (equal math-expr-data "\\ldots"))))
+      (if (equal math-expr-data ",")
 	  (math-read-token))
       (while (eq exp-token 'space)
 	(math-read-token))
@@ -1570,7 +1570,7 @@
     (cons 'vec val)))
 
 (defun math-read-matrix (mat)
-  (while (equal exp-data ";")
+  (while (equal math-expr-data ";")
     (math-read-token)
     (while (eq exp-token 'space)
       (math-read-token))