我使用以下代码片段在Emacs启动时设置主题.
(load-theme 'sanityinc-tomorrow-eighties)
Run Code Online (Sandbox Code Playgroud)
但是它还要求我确认这将加载一些lisp代码,我该如何关闭此确认?
使用load-theme
非零NOCONFIRM
arg.
C-h f load-theme
告诉你(load-theme 'sanityinc-tomorrow-eighties t)
应该加载主题而不要求确认:
,----
| load-theme is an interactive compiled Lisp function in `custom.el'.
|
| (load-theme THEME &optional NO-CONFIRM NO-ENABLE)
|
| Load Custom theme named THEME from its file.
| The theme file is named THEME-theme.el, in one of the directories
| specified by `custom-theme-load-path'.
|
| If the theme is not considered safe by `custom-safe-themes',
| prompt the user for confirmation before loading it. But if
| optional arg NO-CONFIRM is non-nil, load the theme without
| prompting.
|
| Normally, this function also enables THEME. If optional arg
| NO-ENABLE is non-nil, load the theme but don't enable it, unless
| the theme was already enabled.
|
| This function is normally called through Customize when setting
| `custom-enabled-themes'. If used directly in your init file, it
| should be called with a non-nil NO-CONFIRM argument, or after
| `custom-safe-themes' has been loaded.
|
| Return t if THEME was successfully loaded, nil otherwise.
`----
Run Code Online (Sandbox Code Playgroud)
你应该先学会问Emacs. C-h f
在问这么简单之前,你应该知道和使用的是最少的.