问题
When solving this problem I figured out that I need to disable the site-wise init files in order to get my emacs + CEDET running (everything works nicely when starting emacs using emacs --no-site-file but is broken without the additional argument).
I'd like to disable the site-wise init files permanently but as I'm using several different approaches/methods when launching emacs (launcher/panel/terminal) I don't think aliasing it in my .zshrc won't work.
I require a method to permanently disable all site-start files. Is there any easy way to achieve this? Thanks!
回答1:
Creating a wrapper in /usr/local/bin/emacs should allow you to override the default emacs system-wide, provided you have write access and a sane PATH.
Having said that, advising eieio to load cedet migh be a more adequate workaround.
回答2:
To answer the specific question, it's not possible to disable the site-start file without building your own version of Emacs (or, as you mentioned, always running with --no-site-file).
If you take a look at the documentation for the variable site-run-file, you'll see:
the run-time load order is: 1. file described in this variable (
site-run-file), if non-nil; 2.~/.emacs'; 3.default.el'.
If running Emacs with -q is enough to solve the problem, you can achieve that in your .emacs by setting:
(setq inhibit-default-init t)
All that being said, it's pretty straight forward to build/install your own Emacs. You can pretty much cut/paste the commands listed on this page (they are ./configure; make; make install).
来源:https://stackoverflow.com/questions/13233285/howto-disable-the-emacs-site-start-files-permanently