我想解决我的“.emacs bankruptcy ”问题,我已经经历过
https://help.ubuntu.com/community/EmacsHowto
http://www.emacswiki.org/emacs/DotEmacsBankruptcy
http://www.emacswiki.org/emacs/DotEmacsDotD
http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
我仍然不清楚 .emacs.d
文件夹是否是解决方案。即,它是否会像普通的 .d 文件夹一样运行,例如 /etc/profile.d/
,您将脚本放在其中,系统会自动神奇地拾取它们。请确认。
如果没有,有人可以给我一个可以做到这一点的脚本,或者给我一个解决方案吗?
谢谢
最佳答案
我的 ~/.emacs
文件的基本内容是:
(require 'cl)
(loop for src in (directory-files "~/.emacs.d" 'full-path "[0-9].*\\.el$") do
(let ((byte (concat src "c")))
(when (file-newer-than-file-p src byte)
(byte-compile-file src))
(message "Loading %s.elc" byte)
(load-file byte)))
它从 ~/.emacs.d
加载以数字开头的配置文件。如果源文件(扩展名.el
)比字节编译版本(扩展名.elc
)新,那么它会对源进行字节编译。然后它加载字节编译文件。
关于emacs - 让 .emacs.d 的行为就像 .d 文件夹一样,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20826544/