[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] New convenience macros
From: |
Stefan Monnier |
Subject: |
Re: [PATCH] New convenience macros |
Date: |
Thu, 23 Aug 2007 15:12:09 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
>>> (if (and (featurep 'simple) (featurep 'xemacs)) a b)
>>> warns about free variables for both `a' and `b'. So I think having the
>> That's a valid criticism, but I fail to see how your macros would fare any
>> better on the above kind of code. I.e. what code would you write instead of
>> the above, using your macros?
> (or (do-in-xemacs (when (featurep 'simple) a)) b)
Aka (or (if (featurep 'xemacs) (when (featurep 'simple) a)) b)
which would naturally be rewritten as
(if (and (featurep 'xemacs) (featurep 'simple)) a b)
> (with-emacs-type 'xemacs (when (featurep 'simple) a))
> (with-emacs-type 'emacs b)
(if (featurep 'xemacs) (when (featurep 'simple) a))
(unless (featurep 'xemacs) b)
which would naturally be rewritten as
(if (featurep 'xemacs) (when (featurep 'simple) a) b)
> Both only warn about `b' and the resulting bytecode has no mention of
> `a'.
Same for my alternatives, which are the most obvious translations of
your code. Note that the macro form is never simpler or clearer.
So I really fail to see the value of those macros.
Stefan
- [PATCH] New convenience macros, Steve Youngs, 2007/08/18
- Re: [PATCH] New convenience macros, Richard Stallman, 2007/08/19
- Re: [PATCH] New convenience macros, Steve Youngs, 2007/08/19
- Re: [PATCH] New convenience macros, Kim F. Storm, 2007/08/20
- Re: [PATCH] New convenience macros, Richard Stallman, 2007/08/20
- Re: [PATCH] New convenience macros, Steve Youngs, 2007/08/23
- Re: [PATCH] New convenience macros, Johan Bockgård, 2007/08/23
- Re: [PATCH] New convenience macros, Stefan Monnier, 2007/08/23
- Re: [PATCH] New convenience macros, Steve Youngs, 2007/08/23
- Re: [PATCH] New convenience macros,
Stefan Monnier <=
- Re: [PATCH] New convenience macros, Steve Youngs, 2007/08/26
- Re: [PATCH] New convenience macros, Richard Stallman, 2007/08/26
- Re: [PATCH] New convenience macros, Steve Youngs, 2007/08/26
Re: [PATCH] New convenience macros, Stefan Monnier, 2007/08/20