Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 61 lines (55 sloc) 1.722 kB
a9c5401 @tiagosab Add develock mode to python.
authored
1 ;;
2 ;; develock-py.el
3 ;;
4 ;; Made by Daniel Farina
5 ;; Login <drfarina@acm.org>
6 ;;
7 ;; Started on Sun Feb 14 09:21:21 2010 Daniel Farina
8 ;; Last update Sun Feb 14 09:27:12 2010 Daniel Farina
9 ;;
10 ;; Downloaded from
11 ;; http://metalinguist.wordpress.com/2010/02/14/emacs-develock-customization-for-python/
12 ;; on Sex Mai 20 11:24:28 2011
13 (require 'develock)
14
15 (defcustom develock-python-font-lock-keywords
16 '(;; a long line
17 (develock-find-long-lines
18 (1 'develock-long-line-1 t)
19 (2 'develock-long-line-2 t))
20 ;; long spaces
21 (develock-find-tab-or-long-space
22 (1 'develock-whitespace-2)
23 (2 'develock-whitespace-3 nil t))
24 ;; trailing whitespace
25 ("[^\t\n ]\\([\t ]+\\)$"
26 (1 'develock-whitespace-1 t))
27 ;; spaces before tabs
28 ("\\( +\\)\\(\t+\\)"
29 (1 'develock-whitespace-1 t)
30 (2 'develock-whitespace-2 t))
31 ;; tab space tab
32 ("\\(\t\\) \t"
33 (1 'develock-whitespace-2 append))
34 ;; only tabs or spaces in the line
35 ("^[\t ]+$"
36 (0 'develock-whitespace-2 append))
37 ;; reachable E-mail addresses
38 ("<?[-+.0-9A-Z_a-z]+@[-0-9A-Z_a-z]+\\(\\.[-0-9A-Z_a-z]+\\)+>?"
39 (0 'develock-reachable-mail-address t))
40 ;; things to be paid attention
41 ("\\<\\(?:[Ff][Ii][Xx][Mm][Ee]\\|[Tt][Oo][Dd][Oo]\\)\\(?::\\|\\>\\)"
42 (0 'develock-attention t)))
43 "Extraordinary level highlighting for the Python mode."
44 :type develock-keywords-custom-type
45 :set 'develock-keywords-custom-set
46 :group 'develock
47 :group 'font-lock)
48
49 (defvar python-font-lock-keywords-x nil
50 "Extraordinary level font-lock keywords for the Python mode.")
51
52 (setq develock-keywords-alist
53 (cons '(python-mode
54 python-font-lock-keywords-x
55 develock-python-font-lock-keywords)
56 develock-keywords-alist))
57
58 (plist-put develock-max-column-plist 'python-mode 79)
59
60 (provide 'develock-py)
Something went wrong with that request. Please try again.