[Top][All Lists]

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

Re: Rewriting make-docfile.c in Lisp?

From: Stefan Monnier
Subject: Re: Rewriting make-docfile.c in Lisp?
Date: Wed, 05 May 2021 17:34:01 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> Agreed: I'm generally all for writing ELisp instead of C, but
>>> I wouldn't bother rewriting this code in ELisp, personally.
>> Sounds like the etc/TODO entry that suggests doing just this should be
>> updated/removed then. It refers to
>> https://lists.gnu.org/r/emacs-devel/2012-06/msg00037.html
> But there the idea was specifically for the scan of .el(c) files and not
> for the scan of C files.  Also the idea was not to implement a new
> scanning code but to do it from existing code that already looks at
> the files (e.g. `autoloads.el` or the `bytecomp.el`).

BTW, personally, I think a better goal would be to try and eliminate the
DOC file altogether: for the docstrings coming from C code we should be
able to keep them in normal static variables (and move them to
a separate section with `_attribute__ ((section (".docstrings")))` or
something like that), and for the docstrings coming from preloaded ELisp
files we can fetch them from the .elc file like we do for
non-preloaded files.

The `make-docfile.c` would still be needed (probably under a new name)
for things like `global.h`, of course, and I don't see a convenient way
to replace it with a version written in ELisp for bootstrapping reasons.


reply via email to

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