Reputation: 10370
When I start a terminal in Emacs 23.3.1 it prompts me with "Run program: /usr/local/bin/bash". How can I get rid of this prompt? I would like to bind F4 to starting a terminal without it prompting me for the same shell every time.
Something like:
(global-set-key [f4] 'term)
This doesn't work though. It will start a terminal, but it still prompts me to enter the shell again.
Upvotes: 5
Views: 521
Reputation: 29546
(global-set-key [f4] '(lambda () (interactive) (term (getenv "SHELL"))))
Upvotes: 8