--- /dev/null
+;;
+;; develock-py.el
+;;
+;; Made by Daniel Farina
+;; Login <drfarina@acm.org>
+;;
+;; Started on Sun Feb 14 09:21:21 2010 Daniel Farina
+;; Last update Sun Feb 14 09:27:12 2010 Daniel Farina
+;;
+
+(require 'develock)
+
+(defcustom develock-python-font-lock-keywords
+ '(;; a long line
+ (develock-find-long-lines
+ (1 'develock-long-line-1 t)
+ (2 'develock-long-line-2 t))
+ ;; long spaces
+ (develock-find-tab-or-long-space
+ (1 'develock-whitespace-2)
+ (2 'develock-whitespace-3 nil t))
+ ;; trailing whitespace
+ ("[^\t\n ]\\([\t ]+\\)$"
+ (1 'develock-whitespace-1 t))
+ ;; spaces before tabs
+ ("\\( +\\)\\(\t+\\)"
+ (1 'develock-whitespace-1 t)
+ (2 'develock-whitespace-2 t))
+ ;; tab space tab
+ ("\\(\t\\) \t"
+ (1 'develock-whitespace-2 append))
+ ;; only tabs or spaces in the line
+ ("^[\t ]+$"
+ (0 'develock-whitespace-2 append))
+ ;; reachable E-mail addresses
+ ("<?[-+.0-9A-Z_a-z]+@[-0-9A-Z_a-z]+\\(\\.[-0-9A-Z_a-z]+\\)+>?"
+ (0 'develock-reachable-mail-address t))
+ ;; things to be paid attention
+ ("\\<\\(?:[Ff][Ii][Xx][Mm][Ee]\\|[Tt][Oo][Dd][Oo]\\)\\(?::\\|\\>\\)"
+ (0 'develock-upper-case-tag-face t)))
+ "Extraordinary level highlighting for the Python mode."
+ :type develock-keywords-custom-type
+ :set 'develock-keywords-custom-set
+ :group 'develock
+ :group 'font-lock)
+
+(defvar python-font-lock-keywords-x nil
+ "Extraordinary level font-lock keywords for the Python mode.")
+
+(setq develock-keywords-alist
+ (cons '(python-mode
+ python-font-lock-keywords-x
+ develock-python-font-lock-keywords)
+ develock-keywords-alist))
+
+(plist-put develock-max-column-plist 'python-mode 100)
+
+(provide 'develock-py)
\ No newline at end of file
-(add-to-list 'load-path "~/.emacs.d/auto-install")
-(setq custom-file "~/.emacs.d/emacs-custom.el")
+(let ((base (file-name-directory
+ (directory-file-name
+ (file-name-directory
+ (or load-file-name
+ (when (boundp 'bytecomp-filename) bytecomp-filename) buffer-file-name))))))
+
+ (add-to-list 'load-path (concat base "lib"))
+ (setq custom-file (concat base "emacs-custom.el")))
+
(load custom-file)
(global-set-key "\C-c's" 'flyspell-mode)
(global-set-key "\C-c'a" 'global-auto-revert-mode)
+(require 'develock)
+(require 'develock-py)
+
(defun toggle-whitespace-modes ()
(interactive)
(if whitespace-mode
(whitespace-mode 1)
(develock-mode 1)))
-(global-set-key "\C-c' " 'toggle-whitespace-modes)
\ No newline at end of file
+(global-set-key "\C-c' " 'toggle-whitespace-modes)