blob: f3d1b087403e5248d06481aad4be5d798122ea04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
(defun km/python-sysexit ()
(interactive)
(insert "sys.exit()"))
(defun km/python-random-assignment ()
(interactive)
(km/insert-random-string 10)
(insert " = None"))
(defun km/python-shebang ()
(interactive)
(km/shebang "python"))
(defun km/python-hook ()
(local-set-key (kbd "C-c p r") 'km/python-random-assignment)
(local-set-key (kbd "C-c p e") 'km/python-sysexit)
(local-set-key (kbd "C-c p s") 'km/python-shebang))
(add-hook 'python-mode-hook 'km/python-hook)
|