Invalid feature warning in Emacs

I wanted to get rid of this automatic “splash screen” that Emacs visits (called GNU Emacs). I added the following line to the .emacs file:

(add-hook 'after-init-hook' (kill-buffer "GNU Emacs"))

Well, this works, but I get the following warning message in the echo area:

"Invalid function: (kill-buffer" GNU Emacs ")

I do not see what is invalid. Somebody knows?

Thanks, Postscript I'm sure the best approach is to make Emacs just not visit GNU Emacs, but I did not understand how to do this (maybe something in the default.el file?)

+4
source share
2 answers
  • Look at the variable inhibit-startup-screen .

     (setq inhibit-startup-screen t) 
  • The add-hook function expects the function to become its second argument; '(kill-buffer ...) evaluates a list that is not a function. One way to turn it into a function is to use the lambda operator:

     (add-hook 'after-init-hook (lambda () (kill-buffer "GNU Emacs"))) 
+7
source

(setq inhibit-default-init 1) is one way to do this. Didn't this work for you?

0
source

All Articles