2010-07-28 64 views

回答

16

emacs -qemacs --no-init-file將導致emacs不讀取〜/ .emacs文件。如果有〜/ .emacs文件,它不應該嘗試讀取〜/ .emacs.d。如果沒有〜/ .emacs文件,它會讀取〜/ .emacs.d/init.el。有關更多信息,請參閱emacs wiki

有關啓動時的信息,請參閱elisp manual

3

基於sanityinc's answer,我加入做了一些實驗(消息 「*消息*」)在〜/ .emacs.d/init.el結束,我個人的EL文件(smcho.el),和.emacs.el,我打開消息緩衝區。

這是Aquamacs的結果。

 
Loading prestart plugin files ... 
... done. 
Shell: /bin/bash 
Loading `emulate-mac-keyboard-mode': old-style backquotes detected! 
Loading /Users/smcho/Library/Preferences/Aquamacs Emacs/Recent Files.el (source)...done 
Cleaning up the recentf list...done (0 removed) 
27 environment variables imported from login shell (/bin/bash). 
Loading /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/auctex.el (source)...done 
Loading /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/haskell-mode/haskell-site-file.el (source)...done 
Loading plugins ... 
Loading /Library/Application Support/Aquamacs Emacs/SLIME/site-start.el (source)...done 
Loading /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/site-start.el (source)...done 
... done. 
***** Hello from .emacs, and I'm with Aquamacs 
***** hello from smcho.el 
Loading /Users/smcho/Library/Preferences/Aquamacs Emacs/customizations.el (source)...done 
Loading /Users/smcho/Library/Preferences/Aquamacs Emacs/Preferences.el (source)...done 
Mark set 
one-buffer-one-frame-mode disabled. 
Loading /Users/smcho/Library/Preferences/Aquamacs Emacs/frame-positions.el (source)...done 

它的.emacs和smcho.el讀取,而不是從〜/ .emacs.d/init.el。 這是來自Aqua emacs。

 
Loading /Users/smcho/.emacs.d/package.el (source)...done 
***** Hello from .emacs, and I'm with Aqua emacs 
***** hello from smcho.el 
For information about GNU Emacs and the GNU system, type C-h C-a. 

同樣它不會從〜/ .emacs.d/init.el讀,但出發點,如果〜/ .emacs.d/package.el。

4

Emacs的啓動程序詳細解釋爲here。 emacs lisp手冊附帶emacs,因此您應該參考該手冊而不是Web上的鏈接手冊,因爲前者將與您的emacs版本完全匹配。要訪問它,請在emacs中鍵入C-h i m elisp RET m Starting Up RET

0

如果有.emacs文件,那麼emacs不會加載〜/ .emacs.d/init.el文件,如果你想使用.emacs.d/init.el文件,你應該刪除〜 /.emacs文件