| commit 30: | 22770be88800 |
| parent 29: | 89e968414089 |
| branch: | default |
finally got a flymake-mode that works!
- View Josh's profile
-
Josh's public repos »
- django-invitation
- django-openid-auth
- django-piston
- django-draper
- django-vcs
- textmate-mode
- pyvcs
- django-cumulus
- django-twitter-oauth
- django-syncr
- django-linktag
- emacs
- oh-my-zsh
- django-twitter-backend
- Mercurial for ZSH
- python-twitter
- Adamanteus
- django-twitter
- django-storages
- Django-Piston Presentation
- oauth-python-twitter
- Django-Forerscope
- Send message
6 months ago
Changed (Δ641 bytes):
raw changeset »
init.el (26 lines added, 11 lines removed)
1 |
1 |
;; Add plugins to load-path |
2 |
2 |
(add-to-list 'load-path "~/.emacs.d/plugins") |
3 |
3 |
|
4 |
;; enable line numbers for text-mode |
|
5 |
(global-linum-mode t) |
|
6 |
||
7 |
4 |
;; set up textmate-mode |
8 |
5 |
(require 'textmate-mode) |
9 |
6 |
(add-hook 'python-mode-hook 'textmate-mode) |
7 |
(add-hook 'emacs-lisp-mode-hook 'textmate-mode) |
|
10 |
8 |
|
11 |
9 |
;; set up electric pairs for elisp-mode |
12 |
(add-hook 'emacs-lisp-mode-hook |
|
13 |
(lambda () |
|
14 |
(define-key emacs-lisp-mode-map "(" 'electric-pair))) |
|
15 |
(defun electric-pair () |
|
16 |
"Insert character pair without sournding spaces" |
|
17 |
(interactive) |
|
18 |
(let (parens-require-spaces) |
|
19 |
(insert-pair))) |
|
10 |
;; (add-hook 'emacs-lisp-mode-hook |
|
11 |
;; (lambda () |
|
12 |
;; (define-key emacs-lisp-mode-map "(" 'electric-pair))) |
|
13 |
;; (defun electric-pair () |
|
14 |
;; "Insert character pair without sournding spaces" |
|
15 |
;; (interactive) |
|
16 |
;; (let (parens-require-spaces) |
|
17 |
;; (insert-pair))) |
|
20 |
18 |
|
21 |
19 |
;; Set tabs to be 4 spaces |
22 |
20 |
(setq indent-tabs-mode nil) |
108 |
106 |
;; Your init file should contain only one such instance. |
109 |
107 |
;; If there is more than one, they won't work right. |
110 |
108 |
) |
109 |
||
110 |
;; code checking via flymake |
|
111 |
;; set code checker here from "epylint", "pyflakes" |
|
112 |
(setq pycodechecker "pyflakes") |
|
113 |
(when (load "flymake" t) |
|
114 |
(defun flymake-pycodecheck-init () |
|
115 |
(let* ((temp-file (flymake-init-create-temp-buffer-copy |
|
116 |
'flymake-create-temp-inplace)) |
|
117 |
(local-file (file-relative-name |
|
118 |
temp-file |
|
119 |
(file-name-directory buffer-file-name)))) |
|
120 |
(list pycodechecker (list local-file)))) |
|
121 |
(add-to-list 'flymake-allowed-file-name-masks |
|
122 |
'("\\.py\\'" flymake-pycodecheck-init))) |
|
123 |
||
124 |
(add-hook 'python-mode-hook 'flymake-mode) |
|
125 |
