I wanted to read the Emacs source code, so I could access the elisp source code that defines functions in C-hk and C-hf, but
When I tried to access a more core part of the source file written in C language (searching C-hf and trying to jump to a place linked to C source code), it became like "The C source window.c is not available" and I couldn't jump.
Where is the source file of C implementing Emacs stored?
I installed it on Mac OS X using Homebrew.
The elisp file is located in the following directory:
/usr/local/Cellar/emacs-mac/emacs-25.1-z-mac-6.1/share/emacs/25.1/lisp/
From the help screen, you can link C to a function by setting the find-function-C-source-directory
variable to the directory where the emacs were compiled.
In the case of Homebrew, the source code may be present in ~/Library/Caches/Homebrew/emacs-*
(where *
is the version number).If so, add (assuming the emacs version is 24.3)
(setq find-function-C-source-directory"~/Library/Caches/Homebrew/emacs-24.3/src") to ~/.emacs
.
When searching for C language source code (header) in emacs, the tag table was created with the command etag
and the function was tracked with M-.
and M-x find-tag
.
https://www.gnu.org/software/emacs/manual/html_node/emacs/Tags-Tables.html#Tags-Tables
It's mirrored by GitHub, so why don't you look over there first?
https://github.com/emacs-mirror/emacs/blob/master/src/window.c
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
912 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.