emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggest FSF incorporation of XEmacs schema to cleanly suppress byte-


From: Stefan Monnier
Subject: Re: Suggest FSF incorporation of XEmacs schema to cleanly suppress byte-compilation warnings
Date: Wed, 08 Dec 2004 20:11:34 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]