Emacs "M-x term" Prompt

editor, elisp, emacs

Solution

(global-set-key [f4] '(lambda () (interactive) (term (getenv "SHELL"))))

Problem

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.

Original source