richleland / emacs

fork of emacs

.emacs.d config files

Clone this repository (size: 245.8 KB): HTTPS / SSH
$ hg clone http://code.richleland.com/emacs

Changed (Δ641 bytes):

raw changeset »

init.el (26 lines added, 11 lines removed)

Up to file-list init.el:

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