* lisp/progmodes/python.el (python-shell--save-temp-file): Tiny change
authorJorgen Schaefer <forcer@forcix.cx>
Sat, 23 Nov 2013 03:13:16 +0000 (19:13 -0800)
committerGlenn Morris <rgm@gnu.org>
Sat, 23 Nov 2013 03:13:16 +0000 (19:13 -0800)
Delete temp-file when done.

Fixes: debbugs:15647

lisp/ChangeLog
lisp/progmodes/python.el

index ede723e..8c9e57f 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-23  Jorgen Schaefer  <forcer@forcix.cx>  (tiny change)
+
+       * progmodes/python.el (python-shell--save-temp-file):
+       Delete temp-file when done.  (Bug#15647)
+
 2013-11-23  Ivan Shmakov  <ivan@siamics.net>  (tiny change)
 
        * vc/diff-mode.el (diff-mode): Only allow diff-default-read-only
index 7a90f0b..b3918e9 100644 (file)
@@ -2046,6 +2046,8 @@ there for compatibility with CEDET.")
     (with-temp-file temp-file-name
       (insert "# -*- coding: utf-8 -*-\n") ;Not needed for Python-3.
       (insert string)
+      (insert (format "\n\nimport os ; os.remove('''%s''')\n"
+                      temp-file-name))
       (delete-trailing-whitespace))
     temp-file-name))