How can I view source code for a builtin Emacs package?
For instance given lisp code (require 'color)
, I would be interested in which functions are provided by that package. I googled emacs "color.el"
and found the source code. But I wonder if this file can be viewed directly from within Emacs itself? By the way, find . -name 'color*'
gives
./share/emacs/24.3/lisp/color.el.gz
./share/emacs/24.3/lisp/color.elc
You can get to the source code in a single command with M-x find-library
.
You can either open the file directly in Emacs. I think .gz
files are by default decompressed. Usually, I pick out one function from the package I'm interested in (e.g. org-mode
), look up the documentation for that using C-hf org-mode
RET and then click on the file name in the documentation buffer. It will take you the source file.
So ./share/emacs/24.3/lisp/color.el.gz
is the gzipped source code, and you can open that in emacs by first doing M-x auto-compression-mode
, and then visiting that file.
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