diff options
| author | Glenn Morris | 2009-09-19 21:22:45 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-09-19 21:22:45 +0000 |
| commit | 547c692190b9d565e3b819f7a146c210fa062bbc (patch) | |
| tree | 618d379aae12576dc9aa3644fe218b96e3182483 | |
| parent | f3445fab9fa6609d316b3dbcabb40e02e7a4dfc4 (diff) | |
| download | emacs-547c692190b9d565e3b819f7a146c210fa062bbc.tar.gz emacs-547c692190b9d565e3b819f7a146c210fa062bbc.zip | |
(calc-graph-lookup): Avoid assignment to free variable `var'.
Delete trailing whitespace.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/calc/calc-graph.el | 17 |
2 files changed, 12 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 590c26c27ba..9419f4d1da4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2009-09-19 Glenn Morris <rgm@gnu.org> | 1 | 2009-09-19 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * calc/calc-graph.el (calc-graph-lookup): Avoid assignment to free | ||
| 4 | variable `var'. | ||
| 5 | |||
| 3 | * calc/calc-alg.el (var): | 6 | * calc/calc-alg.el (var): |
| 4 | * calc/calcalg2.el (var): Define for compiler. | 7 | * calc/calcalg2.el (var): Define for compiler. |
| 5 | 8 | ||
diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el index cb50cf9ab26..c2ca50ac6f7 100644 --- a/lisp/calc/calc-graph.el +++ b/lisp/calc/calc-graph.el | |||
| @@ -227,7 +227,8 @@ | |||
| 227 | (or found | 227 | (or found |
| 228 | (let ((varname (concat "PlotData" | 228 | (let ((varname (concat "PlotData" |
| 229 | (int-to-string | 229 | (int-to-string |
| 230 | (1+ (length calc-graph-var-cache)))))) | 230 | (1+ (length calc-graph-var-cache))))) |
| 231 | var) | ||
| 231 | (setq var (list 'var (intern varname) | 232 | (setq var (list 'var (intern varname) |
| 232 | (intern (concat "var-" varname))) | 233 | (intern (concat "var-" varname))) |
| 233 | found (cons thing var) | 234 | found (cons thing var) |
| @@ -279,9 +280,9 @@ | |||
| 279 | (defvar var-DUMMY2) | 280 | (defvar var-DUMMY2) |
| 280 | (defvar var-PlotRejects) | 281 | (defvar var-PlotRejects) |
| 281 | 282 | ||
| 282 | ;; The following variables are local to calc-graph-plot, but are | 283 | ;; The following variables are local to calc-graph-plot, but are |
| 283 | ;; used in the functions calc-graph-compute-2d, calc-graph-refine-2d, | 284 | ;; used in the functions calc-graph-compute-2d, calc-graph-refine-2d, |
| 284 | ;; calc-graph-recompute-2d, calc-graph-compute-3d and | 285 | ;; calc-graph-recompute-2d, calc-graph-compute-3d and |
| 285 | ;; calc-graph-format-data, which are called by calc-graph-plot. | 286 | ;; calc-graph-format-data, which are called by calc-graph-plot. |
| 286 | (defvar calc-graph-yvalue) | 287 | (defvar calc-graph-yvalue) |
| 287 | (defvar calc-graph-yvec) | 288 | (defvar calc-graph-yvec) |
| @@ -725,7 +726,7 @@ | |||
| 725 | calc-graph-yp (nconc calc-graph-yp (cons 0 (copy-sequence (cdr calc-graph-y3value)))) | 726 | calc-graph-yp (nconc calc-graph-yp (cons 0 (copy-sequence (cdr calc-graph-y3value)))) |
| 726 | calc-graph-zp (nconc calc-graph-zp (cons '(skip) | 727 | calc-graph-zp (nconc calc-graph-zp (cons '(skip) |
| 727 | (copy-sequence (cdr (car calc-graph-yvalue))))))) | 728 | (copy-sequence (cdr (car calc-graph-yvalue))))))) |
| 728 | (setq calc-graph-numsteps (1- (* calc-graph-numsteps | 729 | (setq calc-graph-numsteps (1- (* calc-graph-numsteps |
| 729 | (1+ calc-graph-numsteps3))))) | 730 | (1+ calc-graph-numsteps3))))) |
| 730 | (if (= (setq calc-graph-numsteps (1- (length calc-graph-yvalue))) 0) | 731 | (if (= (setq calc-graph-numsteps (1- (length calc-graph-yvalue))) 0) |
| 731 | (error "Can't plot an empty vector")) | 732 | (error "Can't plot an empty vector")) |
| @@ -1098,9 +1099,9 @@ This \"dumb\" driver will be present in Gnuplot 3.0." | |||
| 1098 | (buffer-substring (match-beginning 1) | 1099 | (buffer-substring (match-beginning 1) |
| 1099 | (match-end 1))))))) | 1100 | (match-end 1))))))) |
| 1100 | (unless yerr | 1101 | (unless yerr |
| 1101 | (setq lenbl (or (equal mode "lines") | 1102 | (setq lenbl (or (equal mode "lines") |
| 1102 | (equal mode "linespoints")) | 1103 | (equal mode "linespoints")) |
| 1103 | penbl (or (equal mode "points") | 1104 | penbl (or (equal mode "points") |
| 1104 | (equal mode "linespoints"))) | 1105 | (equal mode "linespoints"))) |
| 1105 | (if lines | 1106 | (if lines |
| 1106 | (or (eq lines t) | 1107 | (or (eq lines t) |
| @@ -1117,7 +1118,7 @@ This \"dumb\" driver will be present in Gnuplot 3.0." | |||
| 1117 | (setq errform | 1118 | (setq errform |
| 1118 | (condition-case nil | 1119 | (condition-case nil |
| 1119 | (math-contains-sdev-p | 1120 | (math-contains-sdev-p |
| 1120 | (eval (intern | 1121 | (eval (intern |
| 1121 | (concat "var-" | 1122 | (concat "var-" |
| 1122 | (save-excursion | 1123 | (save-excursion |
| 1123 | (re-search-backward ":\\(.*\\)\\}") | 1124 | (re-search-backward ":\\(.*\\)\\}") |
| @@ -1134,7 +1135,7 @@ This \"dumb\" driver will be present in Gnuplot 3.0." | |||
| 1134 | (if penbl "linespoints" "lines") | 1135 | (if penbl "linespoints" "lines") |
| 1135 | (if penbl "points" "dots")))) | 1136 | (if penbl "points" "dots")))) |
| 1136 | (if (and pstyle (> pstyle 0)) | 1137 | (if (and pstyle (> pstyle 0)) |
| 1137 | (insert " " | 1138 | (insert " " |
| 1138 | (if (and lstyle (> lstyle 0)) (int-to-string lstyle) "1") | 1139 | (if (and lstyle (> lstyle 0)) (int-to-string lstyle) "1") |
| 1139 | " " (int-to-string pstyle)) | 1140 | " " (int-to-string pstyle)) |
| 1140 | (if (and lstyle (> lstyle 0)) | 1141 | (if (and lstyle (> lstyle 0)) |