From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: stop using P_, __P in header files Date: Mon, 05 Jul 2010 01:51:28 -0400 Message-ID: References: <4C2DB1E0.7010305@swipnet.se> <83aaqa9ml7.fsf@gnu.org> <9A690AC5-8C59-4691-88AC-EDDABCF2F704@raeburn.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1278309100 16005 80.91.229.12 (5 Jul 2010 05:51:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Jul 2010 05:51:40 +0000 (UTC) Cc: Emacs Developers To: Ken Raeburn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 05 07:51:39 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OVeag-0002if-Is for ged-emacs-devel@m.gmane.org; Mon, 05 Jul 2010 07:51:38 +0200 Original-Received: from localhost ([127.0.0.1]:50943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVeaf-0006Cn-Vp for ged-emacs-devel@m.gmane.org; Mon, 05 Jul 2010 01:51:38 -0400 Original-Received: from [199.232.76.173] (port=60438 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVeaY-0006CC-S3 for emacs-devel@gnu.org; Mon, 05 Jul 2010 01:51:30 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1OVeaX-0008CI-I7 for emacs-devel@gnu.org; Mon, 05 Jul 2010 01:51:30 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:54805) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1OVeaX-0008CE-Bj for emacs-devel@gnu.org; Mon, 05 Jul 2010 01:51:29 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OVeaW-0007jn-QM; Mon, 05 Jul 2010 01:51:28 -0400 In-Reply-To: <9A690AC5-8C59-4691-88AC-EDDABCF2F704@raeburn.org> (Ken Raeburn's message of "Sun\, 4 Jul 2010 17\:24\:49 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:126782 Archived-At: Ken Raeburn writes: > On Jul 4, 2010, at 12:46, Dan Nicolaescu wrote: >> There are some remaining issues to solve: >> >> - DEFUNs need to be converted by hand, protoize does not know anything about them. > > (By *hand*?? Ugh. We really need a tool that implements some kind of editing macros... :-) The macros don't just exist, so manual work is needed as opposed to just running protoize for most of the rest. :-) > Also, I believe make-docfile scans the argument lists; it may need to be taught about the new syntax. Good point. If you are familiar with that code, please do it. > Or, the explicit old-style argument declarations can go away, and > DEFUN can be taught how to expand a list of argument names into a > list of new-style argument declarations. I thought about doing this > back in May when we were discussing the DOC file name handling and > version number definition; I think it would require making a bunch > of helper macros for each MAXARGS value that could get passed. (I > was thinking about it in the context of putting the doc strings in a > section of the executable that only gets paged in when needed on > most platforms, rather than having to copy them to and then load > from a separate file.) >> - the error and message functions in lisp.h are called with variable >> number of arguments, but are defined with a fixed number of arguments. > > They should probably be fixed to be standard variadic functions, which means doprnt() has to be taught about va_arg. I can take a shot at that, if no one else feels like it; it's probably easy. Please do. [I have a patch to turn on -Wstrict-prototypes by default if available, but it would produce 4 warnings per file including lisp.h, so it won't be very popular until the above is fixed]. Something also needs to be done about the type for lisp.h:Lisp_Subr.function > We could also probably ditch the "register" declarations that date > back to pre-GCC days; do they do *any* good now? Very likely no.