diff options
author | Kyle Meyer <meyerkya@gmail.com> | 2013-01-09 11:43:10 -0500 |
---|---|---|
committer | Kyle Meyer <meyerkya@gmail.com> | 2013-01-09 12:06:26 -0500 |
commit | f5238f044d2f142f1940b93e3761e1f5bfd7ef7c (patch) | |
tree | f8891973414827fcd50768c7eefd425f2ac8fae7 /conf/km-python.el | |
parent | e4028f83dab75489a0bd8fe0e2a8fa4abf2a95ee (diff) | |
download | emacs.d-f5238f044d2f142f1940b93e3761e1f5bfd7ef7c.tar.gz |
py functions: random assingment, shebang, exit
Diffstat (limited to 'conf/km-python.el')
-rw-r--r-- | conf/km-python.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/conf/km-python.el b/conf/km-python.el new file mode 100644 index 0000000..f3d1b08 --- /dev/null +++ b/conf/km-python.el @@ -0,0 +1,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) |