[Top][All Lists]

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

re: Bogus byte-compiler warnings

From: Jonathan Yavner
Subject: re: Bogus byte-compiler warnings
Date: Sun, 12 Nov 2006 16:47:59 -0500
User-agent: KMail/1.6.2

Reiner Steib writes:
> when byte-compiling the following file
> (defun foo-func-1 ()
>   (when (and (boundp 'foo-var)
>            (fboundp 'foo-1))
>     (foo-1)))
> | In end of data:
> | rs-byte-compile-warnings.el:11:1:Warning: the function `foo-1' is
> | not known to be defined.

Bytecomp has a documented hack for use in such cases:
  (defun foo-func-1 ()
    (when (fboundp 'foo-1)
      (when (boundp 'foo-var)

The structure being looked for is "(if (fboundp 'X) BODY)" which 
suppresses the warning for X within BODY.  In your example, the 
presence of 'and' prevents the hack from matching the code.

reply via email to

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