emacs-devel
[Top][All Lists]
Advanced

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

Re: Question about byte-compiler warning


From: Stefan Monnier
Subject: Re: Question about byte-compiler warning
Date: Wed, 26 Sep 2007 10:06:17 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

> Ok, but wasn't the construction:

> (cond
>   ((featurep 'xemacs)
>     <xemacs-part> )
>   (t
>     <emacs-part> ))

> recognized by the byte-compiler as a kind of conditional byte-compilation?

It is, but that is not enough.  The same problem occurs with

  (let ((toto 1))
    (defun foo ()))

  (defun bar ()
    (foo))

In this case, the byte-compiler will also fail to see that `foo' is being
defined and will hence signal "Warning: the function `foo' is not known to
be defined".

> (eval-and-compile
>   (cond
>     ((featurep 'xemacs) <xemacs-part>)
>     (t <emacs-part> ))))

> It could also be used as an alternative construction.

eval-and-compile is ugly.


        Stefan




reply via email to

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