emacs - 防止提示将要加载的主题视为对 future session 安全

标签 emacs themes

我在我的 emacs init.el

中使用了以下主题
(require 'color-theme-sanityinc-tomorrow)
(color-theme-sanityinc-tomorrow-day)

但是,每次我的 Emacs 启动时,它都会询问我“加载一个主题可以运行 Lips Code。真的加载吗?”之后它会询问“将这个主题视为对 future session 安全吗?

我需要做什么才能接受加类。我确信这可以在 Emacs 中自定义,但我对编辑器和一般的 lisp 还是很陌生。

感谢任何帮助..

最佳答案

另一种选择是使用可选的 NO-CONFIRM 开关加载主题,如下所示:

(load-theme 'color-theme-sanityinc-tomorrow-day t nil)

加载主题的描述是这样说的:

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.

关于emacs - 防止提示将要加载的主题视为对 future session 安全,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34265549/

相关文章:

php - 如何在 Emacs 中使 switch 语句中的 case 缩进

emacs - 如何在组织模式下使用TODO标签而不定义标题?

android - 如何以我的风格获取我自己定义的属性值

Delphi DrawThemeBackground在timage上导致白色背景

html - Big Cartel - Luna 2x2 产品主页

regex - Emacs regexp 替换情况

emacs `racket-mode` REPL 未加载识别程序

emacs - 在第一个表达时如何避免多余的空格字符

themes - 在 Notepad++ 中更改功能工具提示的背景颜色

html - 修改微博主题?