summaryrefslogtreecommitdiffstats
path: root/.emacs.d/slash_python.el
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2010-06-30 20:59:12 +0200
committerGravatar Tom Willemsen2010-06-30 20:59:12 +0200
commit722c13a8fc093bc67b9be444547571d544cb79a0 (patch)
tree67ac47a4ec267f56b754134efa2a5a3b51c07dcf /.emacs.d/slash_python.el
downloaddotfiles-722c13a8fc093bc67b9be444547571d544cb79a0.tar.gz
dotfiles-722c13a8fc093bc67b9be444547571d544cb79a0.zip
Switched over from dotemacs to doteverything
Diffstat (limited to '.emacs.d/slash_python.el')
-rw-r--r--.emacs.d/slash_python.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/.emacs.d/slash_python.el b/.emacs.d/slash_python.el
new file mode 100644
index 0000000..4cb2a72
--- /dev/null
+++ b/.emacs.d/slash_python.el
@@ -0,0 +1,17 @@
+;; Pyflakes
+(when (load "flymake" t)
+ (defun flymake-pyflakes-init ()
+ (let* ((temp-file (flymake-init-create-temp-buffer-copy
+ 'flymake-create-temp-inplace))
+ (local-file (file-relative-name
+ temp-file
+ (file-name-directory buffer-file-name))))
+ (list "pyflakes" (list local-file))))
+
+ (add-to-list 'flymake-allowed-file-name-masks
+ '("\\.py\\'" flymake-pyflakes-init)))
+(add-hook 'find-file-hook 'flymake-find-file-hook)
+
+;; Bind RET to py-newline-and-indent
+(add-hook 'python-mode-hook '(lambda ()
+ (define-key python-mode-map "\C-m" 'newline-and-indent))) \ No newline at end of file