comparison .elisp/settings/40.modes.el @ 94:9052c3801744

First stab at some menu items for the nose stuff.
author Augie Fackler <durin42@gmail.com>
date Mon, 27 Apr 2009 21:52:04 -0500
parents 68f53fa09e99
children 0c1db2df2bf8
comparison
equal deleted inserted replaced
93:7f67cf332537 94:9052c3801744
27 27
28 (add-hook 'ruby-mode-hook (lambda () 28 (add-hook 'ruby-mode-hook (lambda ()
29 (af-tab-fix) 29 (af-tab-fix)
30 (local-set-key "\C-m" 'newline-and-indent))) 30 (local-set-key "\C-m" 'newline-and-indent)))
31 31
32
33 (defun af-python-mode-hook () 32 (defun af-python-mode-hook ()
34 ; highlight tabs in Python 33 ; highlight tabs in Python
35 (make-variable-buffer-local 'font-lock-mode-hook) 34 (make-variable-buffer-local 'font-lock-mode-hook)
36 (add-hook 'font-lock-mode-hook 'show-ws-highlight-tabs) 35 (add-hook 'font-lock-mode-hook 'show-ws-highlight-tabs)
37 (make-variable-buffer-local 'python-indent) 36 (make-variable-buffer-local 'python-indent)
38 (if (and buffer-file-name (string-match "melange" buffer-file-name)) 37 (if (and buffer-file-name (string-match "melange" buffer-file-name))
39 (set-variable 'python-indent 2)) 38 (set-variable 'python-indent 2))
40 (af-tab-fix) 39 (af-tab-fix)
40 (easy-menu-add-item nil '("Python") ["Run All Tests" nosetests-all t]
41 "Comment Out Region")
42 (easy-menu-add-item nil '("Python") ["Run Module Tests" nosetests-module t]
43 "Comment Out Region")
44 (easy-menu-add-item nil '("Python") ["Run One Test" nosetests-one t]
45 "Comment Out Region")
46 (easy-menu-add-item nil '("Python") ["Debug One Test" nosetests-pdb-one t]
47 "Comment Out Region")
48 (easy-menu-add-item nil '("Python") ["-" nil t] "Comment Out Region")
41 ) 49 )
42 (add-hook 'python-mode-hook 'af-python-mode-hook) 50 (add-hook 'python-mode-hook 'af-python-mode-hook)
43 51
44 (add-hook 'compilation-mode-hook '(lambda () (local-set-key "g" 'recompile))) 52 (add-hook 'compilation-mode-hook '(lambda () (local-set-key "g" 'recompile)))
45 53