elisp - Emacs map <compile "python current-buffer-name"> to a hotkey -
if m-x <ret> compile <ret>
, prompted compile. want compile current buffer in python, type python test.py <ret>
. asked if want create separate process, , want y
(that yes).
(define-key python-mode-map "\c-b" 'compile)
gives following error:
(define-key global-map "\c-b" 'compile)
works, that's far need.
so, how can map compile python current-buffer-name
"\c-b"
?
emacs have concept of modes. guess not want have compilation of python global key.
have checked: http://www.emacswiki.org/emacs?action=browse;oldid=pythonmode;id=pythonprogramminginemacs
what calling external program. i'm sure there better suited way in python-mode.
if want pack more 1 command key, have write kind of wrapper function contains things going call.
Comments
Post a Comment