From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.xemacs.beta Subject: Re: Suggest FSF incorporation of XEmacs schema to cleanly suppress byte-compilation warnings Date: Wed, 08 Dec 2004 20:11:34 -0500 Message-ID: <87wtvsqplx.fsf-monnier+emacs@gnu.org> References: <001901c4dc4e$09a8e540$210110ac@NEEEEEEE> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1102554707 12755 80.91.229.6 (9 Dec 2004 01:11:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2004 01:11:47 +0000 (UTC) Cc: emacs-devel@gnu.org, xemacs-beta@xemacs.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 09 02:11:42 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CcCqM-0006Cv-00 for ; Thu, 09 Dec 2004 02:11:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CcD0E-0008Ia-Sl for ged-emacs-devel@m.gmane.org; Wed, 08 Dec 2004 20:21:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CcD08-0008IV-Bi for emacs-devel@gnu.org; Wed, 08 Dec 2004 20:21:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CcD07-0008IE-Ql for emacs-devel@gnu.org; Wed, 08 Dec 2004 20:21:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CcD07-0008I3-Hl for emacs-devel@gnu.org; Wed, 08 Dec 2004 20:21:47 -0500 Original-Received: from [209.226.175.184] (helo=tomts22-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CcCqD-0005q5-Fz for emacs-devel@gnu.org; Wed, 08 Dec 2004 20:11:33 -0500 Original-Received: from alfajor ([67.71.27.115]) by tomts22-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20041209011132.FVDV1919.tomts22-srv.bellnexxia.net@alfajor>; Wed, 8 Dec 2004 20:11:32 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id B473AD7318; Wed, 8 Dec 2004 20:11:34 -0500 (EST) Original-To: "Ben Wing" In-Reply-To: <001901c4dc4e$09a8e540$210110ac@NEEEEEEE> (Ben Wing's message of "Tue, 7 Dec 2004 05:15:19 -0600") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) 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: main.gmane.org gmane.emacs.devel:30901 gmane.emacs.xemacs.beta:17363 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30901 > Hello. We have had running in XEmacs for two years or more some routines I > wrote to cleanly handle byte-compilation warnings. The problem was that > many byte-compilation warnings were unavoidable when doing legitimate > things. I came up with a clean solution to this problem and it has worked > very well; all of the XEmacs core elisp code is now completely warning-free. > I propose that this be incorporated into GNU Emacs as well. If agreed, I > will sign papers and do whatever else is needed. I am the only author of > this code. I agree it's important that every warning message can be avoided in case of legitimate code. > (defmacro if-boundp (variable then &rest else) > (defmacro when-boundp (variable &rest body) > (defmacro if-fboundp (function then &rest else) > (defmacro when-fboundp (function &rest body) These are unneeded in Emacs-CVS since the byte-compiler automatically recognizes things like (if (boundp 'foo) ...). > (defmacro and-boundp (variable &rest args) > (defmacro and-fboundp (function &rest args) It'd be better to extend our byte-compiler trick to handle `and' additionally to if and cond. > (defmacro globally-declare-boundp (variables) We already have that with the special form (defvar foo) > (defmacro globally-declare-fboundp (functions) Such a feature would be very helpful. Someone recently suggested to use the special form (defun foo) for that, which I think would be perfect. > (defmacro declare-boundp (variable) > (defmacro declare-fboundp (form) > (defmacro with-boundp (variables &rest body) > (defmacro with-fboundp (functions &rest body) > (defmacro with-byte-compiler-warnings-suppressed (type &rest body) > (defmacro with-obsolete-variable (symbol &rest body) > (defmacro with-obsolete-function (symbol &rest body) I'm all for it, Stefan