From d916c9650d8f175bdee543955fa49f119ca0daf3 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 23 Jun 2009 07:28:19 +0000 Subject: [PATCH] (calc-graph-plot): Avoid assignment to free variable `filename'. --- lisp/ChangeLog | 3 +++ lisp/calc/calc-graph.el | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 06aeaca6421..820aa6fc764 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-06-23 Glenn Morris + * calc/calc-graph.el (calc-graph-plot): Avoid assignment to free + variable `filename'. + * comint.el (comint-insert-input): Doc fix. * Makefile.in (ELCFILES): Fix typo in previous change. diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el index 8bc352bfb1a..5e9470da5f3 100644 --- a/lisp/calc/calc-graph.el +++ b/lisp/calc/calc-graph.el @@ -529,10 +529,10 @@ (calc-clear-command-flag 'clear-message) (message "No data to plot!")) (setq calc-graph-data-cache-limit (max calc-graph-curve-num - calc-graph-data-cache-limit) - filename (calc-temp-file-name 0)) - (write-region (point-min) (point-max) filename nil 'quiet) - (calc-gnuplot-command "load" (prin1-to-string filename)) + calc-graph-data-cache-limit)) + (let ((filename (calc-temp-file-name 0))) + (write-region (point-min) (point-max) filename nil 'quiet) + (calc-gnuplot-command "load" (prin1-to-string filename))) (or (equal output "STDOUT") calc-gnuplot-keep-outfile (progn ; need to close the output file before printing/plotting -- 2.39.2