我在windows上,根據thisstartup.el
用於emacs的啓動。但是當我在這個文件中設置代碼時(在我的情況下爲C:\Users\frountch\Progs\emacs24\share\emacs\24.3.50\lisp\startup.el
,刪除.elc
文件後),它不會被執行。startup.el真的用了嗎?
比如我改變defun normal-top-level
來自:
(defun normal-top-level()
"Emacs calls this function when it first starts up.
It sets `command-line-processed', processes the command-line,
reads the initialization files, etc.
It is the default value of the variable `top-level'."
(if command-line-processed
(message "Back to top level.")
到
(devar myload (load-path))
(devar myload2 nil)
(defun normal-top-level()
"fuuuuuuu"
(setq myload2 (load-path))
(if command-line-processed
(message "Back to top level.")
之後,沒有定義myload
和myload2
。
更糟的是,如果我刪除startup.el
和startup.elc
,emacs仍然可以啓動!
是startup.el
真的使用?我如何檢查?
如果我定義
(defun normal-top-level()
"fuuuuu"
(message "fuuu"
)
)
在
startup.el
(startup.elc
還是刪除),當我C-h f
,幫助窗口仍顯示
正常頂層是`啓動編譯Lisp函數.el」。
(正常頂級)
當它第一次啓動Emacs的調用這個函數。它設置爲
command-line-processed', processes the command-line, reads the initialization files, etc. It is the default value of the variable
頂層'。
但是當我點擊'startup.el'.
它打開我的defun(與fuuu)!?
這是一個特定於Win $的問題嗎?是二進制內真正的啓動?
版本是24.3.50.1
謝謝,我很放心。但是你所說的是,在「normal-top-level-add-to-load-path」做任何事情之前,沒有辦法改變'normal-top-level'或者print'load-path',除了「duping」 /重建Emacs?真是太遺憾了...... – frountch
@frountch你爲什麼要改變'正常頂級'?你可以在那個函數中做什麼,你不能在'init.el'中做什麼? – lunaryorn