forked from redguardtoo/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-linum-mode.el
32 lines (31 loc) · 1.48 KB
/
init-linum-mode.el
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
(when *emacs23*
(global-linum-mode t)
;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
twittering-mode
compilation-mode
weibo-timeline-mode
woman-mode
Info-mode
calc-mode
calc-trail-mode
comint-mode
gnus-group-mode
inf-ruby-mode
gud-mode
w3m-mode
gnus-summary-mode
gnus-article-mode
calendar-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)
)
(provide 'init-linum-mode)