开发者

Is Emacs loading my files twice (both .el and .elc)?

I aware that when th开发者_StackOverflow中文版ere's a byte compiled version of a .el file (.elc), emacs loads this second one (I currently pacing them in the same directory).

When I start emacs and I look into my Message buffer I see this:

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

Is emacs loading both the .el and .elc version of the same file? I don't want emacs to load my plugins twice.

In my .emacs I loaded something like this:

;;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)))


Are you loading color-theme using load-file or using require? require will not load a file whose feature has already been provided, only use load-file when you want to explicitly override that. Another possibility is that color-theme-example and color-theme-library are not using provide, so every time they are asked for with require they are being loaded again - but that should print an error ("required feature 'color-theme-example not provided by loaded file" or something similar).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜