From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.devel Subject: Re: Rewriting make-docfile.c in Lisp? Date: Wed, 05 May 2021 17:11:08 -0400 Message-ID: <87mtt8sx77.fsf@catern.com> References: <87zgx9rx7w.fsf@catern.com> <83bl9p2m6s.fsf@gnu.org> <87v97xrurb.fsf@catern.com> <87r1ilrpnt.fsf@catern.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1287"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Mackenzie , Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 05 23:13:44 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1leOpz-0000El-Vr for ged-emacs-devel@m.gmane-mx.org; Wed, 05 May 2021 23:13:44 +0200 Original-Received: from localhost ([::1]:48396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leOpy-0002da-U8 for ged-emacs-devel@m.gmane-mx.org; Wed, 05 May 2021 17:13:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leOnY-0008Fo-Rz for emacs-devel@gnu.org; Wed, 05 May 2021 17:11:13 -0400 Original-Received: from venus.catern.com ([68.183.49.163]:43298) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leOnX-0004CP-0z; Wed, 05 May 2021 17:11:12 -0400 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=98.7.229.235; helo=localhost; envelope-from=sbaugh@catern.com; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=catern.com; s=mail; t=1620249069; bh=9pEiUtsTjyYcYEPNQtNMdF++BgId5rlUsCXQbCnRIhY=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=BBQ5OvNm0qZ06JtcgMtkULS0UP+dKq+ytgcamH2UnRVShoEj4uBruGj3tTNflffbP YeJTZqgMwEsYqeOrzeQpKw4VIdIJmd4yyjOSMeCgZF1p86DW2H47jyLQp0oZfX3AKu 0c7tL+4+f/E8P3N8NpHNsp9yzZ+Kh7pWDsgJ2J9Y= Original-Received: from localhost (cpe-98-7-229-235.nyc.res.rr.com [98.7.229.235]) by venus.catern.com (Postfix) with ESMTPSA id 7514E2E94D2; Wed, 5 May 2021 21:11:09 +0000 (UTC) In-Reply-To: Received-SPF: pass client-ip=68.183.49.163; envelope-from=sbaugh@catern.com; helo=venus.catern.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_PBL=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268934 Archived-At: Stefan Monnier writes: > Maybe if you described the change that motivates your proposal, we'd be > less negative ;-) 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. 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.