forked from jpf/.profile.d
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.emacs
39 lines (30 loc) · 1.34 KB
/
.emacs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
(setq org-log-done 'time)
(add-to-list 'load-path "~/.profile.d/tomorrow-theme/GNU Emacs/")
(load "color-theme-tomorrow")
(color-theme-tomorrow-night)
(global-linum-mode 1)
;;; Via: http://stackoverflow.com/questions/3875213/turning-on-linum-mode-when-in-python-c-mode
(setq linum-mode-inhibit-modes-list '(eshell-mode
shell-mode
erc-mode
jabber-roster-mode
jabber-chat-mode
gnus-group-mode
gnus-summary-mode
gnus-article-mode))
(defadvice linum-on (around linum-on-inhibit-for-modes)
"Stop the load of linum-mode for some major modes."
(unless (member major-mode linum-mode-inhibit-modes-list)
ad-do-it))
(ad-activate 'linum-on)
(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 "flake8" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pyflakes-init)))
(add-hook 'find-file-hook 'flymake-find-file-hook)