summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-04-19 13:35:28 -0400
committerKyle Meyer <kyle@kyleam.com>2014-04-19 13:35:28 -0400
commitb765746c9c8c2c60e1018f48c92b612250776a9e (patch)
treed6edb324acd096b1f669d52cb63307fd40708fe3 /lisp
parent7a29da540a2ffc31ab9389824fc6420efaa04de7 (diff)
downloademacs.d-b765746c9c8c2c60e1018f48c92b612250776a9e.tar.gz
Fix km/create-python-test-file
6cbfae7 broke this function when the test file doesn't exist. I'm not sure why I used `with-current-buffer' in the first place, considering the desired action is to switch to the file in another window.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-python.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/init-python.el b/lisp/init-python.el
index d2f15b7..5ab562e 100644
--- a/lisp/init-python.el
+++ b/lisp/init-python.el
@@ -20,10 +20,9 @@ Unless a prefix argument ARG is given, py.test is also imported."
(test-file (concat "test_" py-file)))
(find-file-other-window test-file)
(unless (file-exists-p test-file)
- (with-current-buffer
- (insert (format "import %s\n" (file-name-sans-extension py-file)))
- (unless arg
- (insert "import pytest\n"))))))
+ (insert (format "import %s\n" (file-name-sans-extension py-file)))
+ (unless arg
+ (insert "import pytest\n")))))
(defun km/pytest-compile (arg)
"Run pytest.