From: Jonathan Yavner <jyavner@member.fsf.org>
Subject: re: Bogus byte-compiler warnings
Date: Sun, 12 Nov 2006 16:47:59 -0500 [thread overview]
Message-ID: <200611121647.59729.jyavner@member.fsf.org> (raw)
In-Reply-To: <E1GjIng-0005ML-HG@monty-python.gnu.org>
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)
(foo-1))))
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.
next parent reply other threads:[~2006-11-12 21:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1GjIng-0005ML-HG@monty-python.gnu.org>
2006-11-12 21:47 ` Jonathan Yavner [this message]
2006-11-13 0:57 ` Bogus byte-compiler warnings Drew Adams
2006-11-12 13:27 Reiner Steib
2006-11-13 9:44 ` Richard Stallman
2006-11-13 11:27 ` Reiner Steib
2006-11-16 17:31 ` Chong Yidong
2006-11-16 18:51 ` Davis Herring
2006-11-19 7:59 ` Richard Stallman
2006-11-19 15:18 ` Chong Yidong
2007-12-01 11:29 ` Reiner Steib
2007-12-01 16:47 ` Dan Nicolaescu
2007-12-01 17:33 ` Reiner Steib
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200611121647.59729.jyavner@member.fsf.org \
--to=jyavner@member.fsf.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).