如何使Emacs C源目录永久? [英] How to make Emacs C source directory permanent?

查看:127
本文介绍了如何使Emacs C源目录永久?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很喜欢Emacs,而我正在学习如何使用它。我知道如何设置我的Emacs C源目录,但我不知道如何使这个更改永久。我想我必须将其设置在我的.emacs文件中,但是我不知道它的命令是什么。有人可以帮助?

解决方案

通常可以使用自定义编辑大多数用户可设置的变量,但由于某种原因, source-directory 变量不是其中之一。



您将需要编辑您的〜/。 emacs 文件包含一行如下:

 (setq source-directory/ path / to / emacs / source / dir)

不要包含尾随的 src 目录;它将被自动添加。然后退出并重新启动Emacs。



请注意,在Emacs运行后设置此功能可能不起作用,因为只有当 find-func.el 加载。你可以设置 find-function-C-source-directory (使用 / src ),但是可以得到覆盖。如上所述,在启动时,只需(setq source-directory ...)


I'm new to Emacs and I'm just learning how to use it. I know how to set my "Emacs C Source dir" but I don't know how to make this change permanent. I guess I have to set it in my .emacs file but I don't know what is the command for it. Can someone help?

解决方案

Ordinarily most user-settable variables can be edited with Customize, but for some reason the source-directory variable isn't one of them.

You will need to edit your ~/.emacs file to include a line such as:

(setq source-directory "/path/to/emacs/source/dir")

Do not include the trailing src directory; it will be added automatically. Then exit and restart Emacs.

Note that setting this after Emacs is running may have no effect because it's only read when find-func.el is loaded. You can set find-function-C-source-directory instead (with the /src), but that can get overwritten. It's better just to (setq source-directory ...) at startup, as above.

这篇关于如何使Emacs C源目录永久?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆