From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#15880: Compute C declarations for DEFSYMs automatically. Date: Wed, 13 Nov 2013 17:32:15 -0800 Organization: UCLA Computer Science Department Message-ID: <5284281F.3050504@cs.ucla.edu> References: <5282C8F4.5010806@cs.ucla.edu> <52830A35.2020005@cs.ucla.edu> <5283A805.7030609@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1384392798 3047 80.91.229.3 (14 Nov 2013 01:33:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Nov 2013 01:33:18 +0000 (UTC) Cc: 15880@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 14 02:33:21 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vglo9-00028j-Bj for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Nov 2013 02:33:21 +0100 Original-Received: from localhost ([::1]:52556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vglo8-00034o-E6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Nov 2013 20:33:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vglnx-0002s6-VP for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2013 20:33:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vglnq-0008TJ-Lj for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2013 20:33:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vglnq-0008TD-JK for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2013 20:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vglnq-0000ha-0Z for bug-gnu-emacs@gnu.org; Wed, 13 Nov 2013 20:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Nov 2013 01:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15880 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 15880-submit@debbugs.gnu.org id=B15880.13843927462647 (code B ref 15880); Thu, 14 Nov 2013 01:33:01 +0000 Original-Received: (at 15880) by debbugs.gnu.org; 14 Nov 2013 01:32:26 +0000 Original-Received: from localhost ([127.0.0.1]:50955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VglnF-0000gc-W0 for submit@debbugs.gnu.org; Wed, 13 Nov 2013 20:32:26 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:54462) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VglnC-0000gO-Md for 15880@debbugs.gnu.org; Wed, 13 Nov 2013 20:32:23 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id C633339E8109; Wed, 13 Nov 2013 17:32:16 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kIfq8THEAgXi; Wed, 13 Nov 2013 17:32:16 -0800 (PST) Original-Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 3389839E80FF; Wed, 13 Nov 2013 17:32:16 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 In-Reply-To: X-Enigmail-Version: 1.6 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:80400 Archived-At: Stefan Monnier wrote: > The two variables have the > same name and same content and are read-only, so the redundancy is harmless. Hmm, well, I suppose you're right. Still, the idea of removing the dependency on DEFSYM-related globals would preclude the potential optimization of putting these globals into a table at compile-time. I suppose that part of the issue is that I don't add or remove DEFSYMs very often, so even aside from the precluded optimization I'm reluctant to complicate the build system just to save a few build-time cycles on these rare occasions. > such that make-docfile finds the "INTERN", infers the Lisp name from the > C name and writes a "syms.c" file which does little else but initialize > all those symbols. I was thinking of something even simpler: no macros at all. If the C source code mentions an identifier Qfoo_bar, make-docfile automatically generates the Lisp symbol foo-bar. To aid transition we could make DEFSYM a no-op, or we could go through the code and eliminate all the DEFSYM calls. (This would all be done after the current patch is installed, of course.)