Emacs 中的无效函数警告
我想摆脱 Emacs 访问的自动“启动屏幕”(称为 GNU Emacs)。我将以下行添加到我的 .emacs 文件中:
(add-hook 'after-init-hook '(kill-buffer "GNU Emacs"))
好吧,它有效,但我收到以下警告回显区域中的消息:
“无效函数:(kill-buffer "GNU Emacs")
我没有看到什么是无效的。有人知道吗?
谢谢, PS 我确信更好的方法是让 Emacs 一开始就不访问 GNU Emacs,但我还没有弄清楚如何做到这一点(也许是默认的东西。 el 文件?)
I wanted to get rid of that automatic "splash screen" that Emacs visits (called GNU Emacs). I added the following line to my .emacs file:
(add-hook 'after-init-hook '(kill-buffer "GNU Emacs"))
Well, it works, but I get the following warning message in the echo area:
"Invalid function: (kill-buffer "GNU Emacs")
I don't see what's invalid. Anyone know?
Thanks,
P.S. I'm sure a better approach would be to get Emacs to just not visit the GNU Emacs in the first place, but I haven't figured out how to do that (maybe something in the default.el file?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看一下变量
inhibit-startup-screen
。函数
add-hook
需要一个函数作为它的第二个参数;'(kill-buffer ...)
计算结果为列表,它不是函数。将其转换为函数的一种方法是使用 lambda 运算符:Take a look at the variable
inhibit-startup-screen
.The function
add-hook
expects a function as its second argument;'(kill-buffer ...)
evaluates to a list, which is not a function. One way to turn it into a function is to use thelambda
operator:(setq Prevent-default-init 1)
是一种方法。这对你没用吗?(setq inhibit-default-init 1)
is one way to do it. Didn't it work for you?