为什么不能emacs 24找到我添加的自定义主题? [英] why cant emacs 24 find a custom theme I added?

查看:187
本文介绍了为什么不能emacs 24找到我添加的自定义主题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的整个emacs设置是 here

My entire emacs setup is here

我加载了我的init -theme.el文件此处

I loaded my init-theme.el file here

据说应该使可用的darkclean主题

但是,当我输入 Mx load-theme TAB 时,没有列出darkclean主题。

But when I type M-x load-theme TAB the darkclean theme is not listed.

如何注册Emacs 24?

How can I register it for Emacs 24?

推荐答案

如果您通过 elpa / package.el 您会注意到,您需要将每个主题文件夹添加到您的自定义主题 - 负载路径 - 这是手动做一点痛苦,特别是当您考虑到升级将创建一个新的文件夹,例如0.1.0 - > 0.1.2将是您的 elpa 文件夹内的新文件夹。

If you install themes via elpa / package.el you'll notice that you need to add each theme folder into your custom-theme-load-path - this is a bit of a pain to do manually, especially when you take into account upgrades will create a new folder, e.g. 0.1.0 -> 0.1.2 will be a new folder inside your elpa folder.

假设您将您的elpa软件包安装到〜/ .emacs.d / elpa / 中,将此脚本添加到您的〜/ .emacs.d / init.el

Assuming you've installed your elpa packages into ~/.emacs.d/elpa/ add this script to your ~/.emacs.d/init.el

(require 'dash)
(require 's)

(-each
   (-map
      (lambda (item)
      (format "~/.emacs.d/elpa/%s" item))
   (-filter
      (lambda (item) (s-contains? "theme" item))
      (directory-files "~/.emacs.d/elpa/")))
   (lambda (item)
      (add-to-list 'custom-theme-load-path item)))

您需要 dash.el s.el (可从elpa获得。)

You'll need dash.el and s.el (available from elpa.)

这篇关于为什么不能emacs 24找到我添加的自定义主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆