Unable to hide welcome screen in Emacs


I want to hide the welcome screen.

My .emacs file:

 (setq c-basic-offset 4) ; indents 4 chars
 (setq tab-width 4)          ; and 4 char wide for TAB
 (setq indent-tabs-mode nil) ; And force use of spaces
 (turn-on-font-lock)       ; same as syntax on in Vim
 (setq width (max width (+ (length str) 1)))   ;line numbers
 (setq inhibit-splash-screen t)         ; hide welcome screen

I have tried to run the last line of code in my .emacs unsuccessfully.

How can you hide the welcome screen in Emacs?

Best Solution

Add the following to your $HOME/.emacs:

(setq inhibit-startup-screen t)

The next time you start Emacs, the welcome screen shouldn't appear. If you already have Emacs open with the welcome screen, you can kill it with C-x k (Control-x, then k).

Related Question