bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37527: [PATCH] Install C source code for for debugging help


From: Paul Eggert
Subject: bug#37527: [PATCH] Install C source code for for debugging help
Date: Sun, 26 Jan 2020 01:00:34 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 1/24/20 11:58 PM, Eli Zaretskii wrote:

Thanks, but the name of this variable gives no clue about the sources
being installed as part of "make install", and neither does its
documentation.  How about emacs-installed-source-directory?

We don't use 'installed-' in other names that have similar roles, e.g., 'data-directory'. These variables and their uses don't care how the files got there, and their names and documentation should focus on what the variables are used for, not on the build process that set them up.

+Emacs installs a compressed copy of much of its source code, to make

"optionally installs", right?  This is an opt-in feature, right?

It's optional, but it's opt-out. I installed the attached patch, which changes the wording to "typically installs". I thought it pretty clear during the discussion that it would be opt-out; that's what my original patch proposed, anyway. I don't see why we'd want it to be opt-in.

+** The new variable 'emacs-source-directory' gives the Emacs source
+code location.

This should explain that this is a copy of the sources, different
from the original source tree where Emacs was built.

Also done in the attached patch.

  (defvar find-function-C-source-directory
-  (let ((dir (expand-file-name "src" source-directory)))
-    (if (file-accessible-directory-p dir) dir))
+  (let ((dir (expand-file-name "src" emacs-source-directory)))
+    (if (file-accessible-directory-p dir) dir
+      (setq dir (expand-file-name "src" source-directory))
+      (if (file-accessible-directory-p dir) dir)))

This is backwards, IMO: it should first try the original source tree,
and only next the installed sources.

The original source tree location is unreliable and is documented to be unreliable, whereas the installed sources are supposed to match the Emacs you're running and that is more useful for C-h f and friends. I'd rather try the reliable copy first.

Attachment: 0001-Improve-doc-for-emacs-source-directory-Bug-36527.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]