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?
You may also write the contents of the buffer to a different file with the command Control-X-Control-W. Emacs will prompt you for the name of the file you want to create. To create a new file, use Control-X-Control-F, just as if the file already existed.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With