aboutsummaryrefslogtreecommitdiffstats
path: root/INSTALL
diff options
context:
space:
mode:
authorPaul Eggert2020-01-24 16:41:38 -0800
committerPaul Eggert2020-01-24 16:46:42 -0800
commitf42d57c7dbd571b449270c8899a67e537561c2b2 (patch)
tree3750aa093fb8ac135c20a247e8d82c49b55bd8a4 /INSTALL
parent0c6c8aa002d321db61afdd14c70744f7bc27f268 (diff)
downloademacs-f42d57c7dbd571b449270c8899a67e537561c2b2.tar.gz
emacs-f42d57c7dbd571b449270c8899a67e537561c2b2.zip
Install C source code for C-h f etc.
Without this change, on typical GNU/Linux distributions like Debian, the first button of ‘C-h f car RET’ does not work because the source code for ‘car’ is not installed (Bug#37527). Fix this by installing the (compressed) C source code alongside the (compressed) Lisp source code that is already installed. This adds about 3 MB (about 2%) to the size of the installed files on my platform. * Makefile.in (emacs_srcdir): New macro. (epaths-force): Substitute PATH_EMACS_SOURCE. (install-c-src): New rule, that installs a copy of the C source code if emacs_srcdir says to. (install-arch-indep): Depend on it. * configure.ac (emacs_srcdir): New var. Add support for --disable-install-srcdir. * lisp/emacs-lisp/find-func.el (find-function-C-source-directory): Look in emacs-source-directory first. (find-function-C-source): Also look for gzipped source files. * lisp/startup.el (normal-top-level): Also recode emacs-source-directory. * src/epaths.in (PATH_EMACS_SOURCE): New macro. * src/lread.c: Include dosname.h, for IS_ABSOLUTE_FILE_NAME. (syms_of_lread): New var emacs-source-directory.
Diffstat (limited to 'INSTALL')
-rw-r--r--INSTALL65
1 files changed, 33 insertions, 32 deletions
diff --git a/INSTALL b/INSTALL
index 2d257f9ce68..cb12e4a17aa 100644
--- a/INSTALL
+++ b/INSTALL
@@ -214,41 +214,42 @@ like 'apt-get build-dep emacs' (on older systems, replace 'emacs' with
214eg 'emacs25'). On Red Hat-based systems, the corresponding command is 214eg 'emacs25'). On Red Hat-based systems, the corresponding command is
215'dnf builddep emacs' (on older systems, use 'yum-builddep' instead). 215'dnf builddep emacs' (on older systems, use 'yum-builddep' instead).
216 216
217
218DEBUGGING AN INSTALLED EMACS
219
220* Installed Emacs source code
221
222Emacs installs a compressed copy of much of its source code, to make
223it easy for users to read the source code of Emacs via commands like
224M-x describe-function (C-h f) to display the definition of a function.
225This compressed copy ordinarily includes both the Elisp source code
226that Emacs is mostly written in, as well as the C source code for the
227core Emacs executable.
228
217* GNU/Linux source and debug packages 229* GNU/Linux source and debug packages
218 230
219Many GNU/Linux systems provide separate packages containing the 231Many GNU/Linux systems provide separate packages containing the
220sources and debug symbols of Emacs. They are useful if you want to 232sources and debug symbols of Emacs. They can help you debug the
221check the source code of Emacs primitive functions or debug Emacs on 233installed Emacs on the C level. The procedures for installing these
222the C level. 234packages depend on the GNU/Linux system that you use.
223 235
224The names of the packages that you need vary according to the 236Emacs debugging symbols are distributed by a debug package if one
225GNU/Linux distribution that you use. On Debian-based systems, you can 237exists for your system. On Debian-based systems, you can
226install a source package of Emacs with a command like 'apt-get source 238install a debug package of Emacs with a command like 'apt-get install
227emacs' (on older systems, replace 'emacs' with eg 'emacs25'). The 239emacs-dbg' (on older systems, replace 'emacs' with e.g. 'emacs25').
228target directory for unpacking the source tree is the current 240On Red Hat-based systems, the corresponding command is 'dnf
229directory. On Red Hat-based systems, the corresponding command is 241debuginfo-install emacs'; this may require adding the *-debuginfo
230'dnf install emacs-debugsource', with target directory /usr/src/debug 242repositories first, via 'dnf config-manager --set-enabled
231(this requires to add the *-debuginfo repositories first, via 'dnf 243fedora-debuginfo updates-debuginfo'.
232config-manager --set-enabled fedora-debuginfo updates-debuginfo'). 244
233 245Some systems also have an Emacs source package that is also helpful
234Once you have installed the source package, for example at 246when debugging the installed Emacs. To unpack an Emacs source package
235/path/to/emacs-26.1, add the following line to your startup file: 247into the current directory on Debian-based systems, you can use a
236 248command like 'apt-get source emacs' (on older systems, replace 'emacs'
237 (setq find-function-C-source-directory 249with e.g. 'emacs25'); you may first need to add the appropriate
238 "/path/to/emacs-26.1/src") 250'source' URIs to your sources.list. On Red Hat-based systems,
239 251installing the debugging symbols automatically installs the
240The installation directory of the Emacs source package will contain 252corresponding source package in the appropriate location.
241the exact package name and version number Emacs is installed on your
242system. If a new Emacs package is installed, the source package must
243be reinstalled as well, and the setting in your startup file must be
244updated.
245
246Emacs debugging symbols are distributed by a debug package. It does
247not exist for every released Emacs package, this depends on the
248distribution. On Debian-based systems, you can install a debug
249package of Emacs with a command like 'apt-get install emacs-dbg' (on
250older systems, replace 'emacs' with eg 'emacs25'). On Red Hat-based
251systems, the corresponding command is 'dnf debuginfo-install emacs'.
252 253
253 254
254DETAILED BUILDING AND INSTALLATION: 255DETAILED BUILDING AND INSTALLATION: