From: Eli Zaretskii <eliz@gnu.org>
To: Spencer Baugh <sbaugh@catern.com>
Cc: acm@muc.de, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Rewriting make-docfile.c in Lisp?
Date: Thu, 06 May 2021 11:45:53 +0300 [thread overview]
Message-ID: <83sg30dzcu.fsf@gnu.org> (raw)
In-Reply-To: <87mtt8sx77.fsf@catern.com> (message from Spencer Baugh on Wed, 05 May 2021 17:11:08 -0400)
> From: Spencer Baugh <sbaugh@catern.com>
> Cc: Alan Mackenzie <acm@muc.de>, Eli Zaretskii <eliz@gnu.org>,
> emacs-devel@gnu.org
> Date: Wed, 05 May 2021 17:11:08 -0400
>
> Perhaps foolishly, I (experimentally) switched some existing uses of
> DEFVAR_PER_BUFFER to a new variant with a new name, and then noticed
> some test failures. I tried to grep for "DEFVAR_PER_BUFFER" (and other
> variations) to find what might be depending on the name of the macro but
> didn't find anything, since make-docfile.c parses DEFVAR_PER_BUFFER one
> character at a time with getc and so doesn't actually include the string
> "DEFVAR_PER_BUFFER" anywhere.
We could improve discoverability of this by adding appropriate
comments to the source code there.
> Eventually I figured out that it was make-docfile that wasn't
> picking up the new name for the DEFVAR_PER_BUFFER macro. So then I
> dug through scan_c_stream in make-docfile.c to see what would be
> required to add support for the DEFVAR_PER_BUFFER variant, but
> eventually gave up on understanding the best way to inject my new
> macro name into the manually-unrolled tree of getc-based parsing.
It's just a series of if/else if tests that examine the characters one
by one, so adding a new macro would mean some more tests like that.
Or am I missing something?
next prev parent reply other threads:[~2021-05-06 8:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 15:56 Rewriting make-docfile.c in Lisp? sbaugh
2021-05-05 16:13 ` Eli Zaretskii
2021-05-05 16:49 ` Spencer Baugh
2021-05-05 17:16 ` Alan Mackenzie
2021-05-05 18:39 ` Spencer Baugh
2021-05-05 19:08 ` Stefan Monnier
2021-05-05 19:13 ` Eli Zaretskii
2021-05-05 19:38 ` Stefan Monnier
2021-05-05 20:05 ` Glenn Morris
2021-05-05 21:18 ` Stefan Monnier
2021-05-05 21:34 ` Stefan Monnier
2021-05-05 21:11 ` Spencer Baugh
2021-05-06 8:45 ` Eli Zaretskii [this message]
2021-05-05 19:10 ` Eli Zaretskii
2021-05-05 21:27 ` Spencer Baugh
2021-05-05 18:49 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83sg30dzcu.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=sbaugh@catern.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).