改变它后,如何重新加载.emacs?(How can I reload .emacs after changing it?)

如何让Emacs重新加载我在.emacs更新的所有定义,而不重新启动Emacs?

How can I get Emacs to reload all my definitions that I have updated in .emacs without restarting Emacs?

最满意答案

您可以使用命令加载文件( Mx load-file ,然后按两次返回接受默认文件名,这是正在编辑的当前文件)。

您也可以将点移动到任何sexp的末尾,然后按Cx Ce执行那个sexp。 通常没有必要重新加载整个文件,如果你只是换一两行。

You can use the command load-file (M-x load-file, then press return twice to accept the default filename, which is the current file being edited).

You can also just move the point to the end of any sexp and press C-xC-e to execute just that sexp. Usually it's not necessary to reload the whole file if you're just changing a line or two.

改变它后,如何重新加载.emacs?(How can I reload .emacs after changing it?)

如何让Emacs重新加载我在.emacs更新的所有定义,而不重新启动Emacs?

How can I get Emacs to reload all my definitions that I have updated in .emacs without restarting Emacs?

最满意答案

您可以使用命令加载文件( Mx load-file ,然后按两次返回接受默认文件名,这是正在编辑的当前文件)。

您也可以将点移动到任何sexp的末尾,然后按Cx Ce执行那个sexp。 通常没有必要重新加载整个文件,如果你只是换一两行。

You can use the command load-file (M-x load-file, then press return twice to accept the default filename, which is the current file being edited).

You can also just move the point to the end of any sexp and press C-xC-e to execute just that sexp. Usually it's not necessary to reload the whole file if you're just changing a line or two.