2013-06-27 Glenn Morris <rgm@gnu.org>
+ * automated/python-tests.el (python-tests-with-temp-file):
+ Clean up after ourself.
+
* automated/undo-tests.el (undo-test3): Remove test that seems to
do nothing that the previous one doesn't, except leave a tempfile.
BODY is code to be executed within the temp buffer. Point is
always located at the beginning of buffer."
(declare (indent 1) (debug t))
- `(let* ((temp-file (concat (make-temp-file "python-tests") ".py"))
+ ;; temp-file never actually used for anything?
+ `(let* ((temp-file (make-temp-file "python-tests" nil ".py"))
(buffer (find-file-noselect temp-file)))
(unwind-protect
(with-current-buffer buffer
(insert ,contents)
(goto-char (point-min))
,@body)
- (and buffer (kill-buffer buffer)))))
+ (and buffer (kill-buffer buffer))
+ (delete-file temp-file))))
(defun python-tests-look-at (string &optional num restore-point)
"Move point at beginning of STRING in the current buffer.