Emacs 加载不同主题后禁用主题(主题冲突)

标签 emacs

在 Emacs 24.3.1 上,如果我 M-X load-theme并加载另一个主题,它经常干扰我当前的主题而不是替换它,在颜色方面给出非常难看的结果。

一个例子在这里,其中 solarized-lightwombat主题有冲突:

solarized-light and wombad conflict

我通过做 M-X disable-theme 来解决这个问题旧主题,有没有更干净的方法来解决这个问题?

最佳答案

首先禁用事件主题肯定会有所帮助。

如果您将此添加到您的 init.el:

(defun disable-all-themes ()
  "disable all active themes."
  (dolist (i custom-enabled-themes)
    (disable-theme i)))

(defadvice load-theme (before disable-themes-first activate)
  (disable-all-themes))

函数load-theme在加载新主题之前,将首先禁用事件主题。

关于Emacs 加载不同主题后禁用主题(主题冲突),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22866733/

相关文章:

Emacs - require-final-newline 本地值覆盖全局值

emacs - 防止 Emacs 询问 "modified buffers exist; exit anyway?"

emacs - elisp宏扩展局部变量

Emacs lisp 定义语法

emacs - 影响列表的一个元素

emacs - 在 Emacs 中终止临时缓冲区之前如何获得警告?

session - Emacs 有哪些备用 session 管理器可用?

regex - 多行的 Emacs 编译模式正则表达式

emacs - Mac 上的 Lisp 开发

emacs - 使用 dired (Emacs) 的一个最有用的例子