4
我知道,当有一个.el文件(.elc)的字节编译版本时,emacs会加载第二个(我目前在同一个目录中调整它们)。Emacs是否加载我的文件两次(包括.el和.elc)?
当我开始Emacs和我看着我的消息缓冲区我看到这一点:
Loading c:/Documents and Settings.../App.../.emacs.d/themes/color-theme-example.el (source)...done
Loading c:/Documents and Setting.../App.../.emacs.d/themes/color-theme-example.elc...done
Loading c:/Documents and Settings.../App.../.emacs.d/themes/color-theme-library.el (source)...done
Loading c:/Documents and Settings.../App.../.emacs.d/themes/color-theme-library.elc...done
是emacs的装载两个.el和同一文件的.elc版本? 我不希望emacs加载我的插件两次。
在我的.emacs我装是这样的:
;;color theme plugin
(add-to-list 'load-path "~/.emacs.d/")
(require 'color-theme)
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)
(color-theme-charcoal-black)))
我在我的.emacs使用此: ;;颜色主题插件 (添加到列表“负载路径‘〜/ .emacs.d /’) (需要”颜色主题) (eval-after-load“color-theme” '(progn (color-theme-initialize) (color-theme-charcoal-black))) – alexchenco 2010-01-17 22:10:15
该手册对此进行了关于eval-after-load的说明:精心设计Lisp程序不应该使用这个特性。您已经需要color-theme,只需直接运行代码即可。它看起来像.emacs是好的,但如果这是唯一相关的代码。我猜想color-theme在内部使用加载文件,或者以某种其他方式导致文件被错误加载多次。 – 2010-01-17 22:17:30
我刚刚下载了color-theme-6.6.0,出于某种原因它调整了我的速度栏比我的屏幕高,但否则使用您在此发布的代码没有问题(color-theme-example.el和color- theme-library.el每个加载一次)。 编译color-theme-example和color-theme-library文件后,它们确实加载了源代码和编译版本。这表示颜色主题代码中存在错误。 – 2010-01-17 22:35:42