From 722c13a8fc093bc67b9be444547571d544cb79a0 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 30 Jun 2010 20:59:12 +0200 Subject: Switched over from dotemacs to doteverything --- .emacs.d/slash_python.el | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .emacs.d/slash_python.el (limited to '.emacs.d/slash_python.el') 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 -- cgit v1.2.3-54-g00ecf