From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: gdb-ui.el assumes images support
Date: Tue, 09 Nov 2004 15:11:57 +0100 [thread overview]
Message-ID: <m3ekj3kt76.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <cmoqit$4rj$1@sea.gmane.org> (Kevin Rodgers's message of "Mon, 08 Nov 2004 15:05:16 -0700")
Kevin Rodgers <ihs_4664@yahoo.com> writes:
> Kim F. Storm wrote:
> > Nick Roberts <nickrob@snap.net.nz> writes:
> >>I added the last require after Gerd Moellmann included the others. My
> >>understanding now is that a file only requires another, at compilation,
> >>if it uses a macro defined in that other file.
> >
> > It may also require another file simply to avoid warnings for using
> > undefined functions that are defined in that file.
> >
> > How else would you avoid such warnings?
>
> With (require 'feature) at the top level, since it is needed at runtime.
file a.el has this:
(require 'b)
;;;#autoload
(defun a-fun1 ()
(b-fun))
(defun a-fun2 ()
t)
(provide 'a)
file b.el has this:
(defun b-fun ()
(a-fun2))
(provide 'b)
Assuming that b is never used directly, this works fine.
Now, when you byte-compile b.el, you get warning for a-fun2.
So according to your advise, we add
(require 'a)
to b.el, and compile again with this result:
b.el:1:2:Error: Recursive `require' for feature `a'
What if
(defun a-fun2)
would be a dummy defun for the byte-compiler just like
(defvar a-var)
?
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2004-11-09 14:11 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-06 17:03 gdb-ui.el assumes images support Eli Zaretskii
2004-11-07 0:23 ` Nick Roberts
2004-11-07 4:48 ` Eli Zaretskii
2004-11-07 10:35 ` Andreas Schwab
2004-11-07 22:12 ` Eli Zaretskii
2004-11-08 10:15 ` Andreas Schwab
2004-11-08 12:11 ` Eli Zaretskii
2004-11-08 16:58 ` Richard Stallman
2004-11-08 20:38 ` Nick Roberts
2004-11-08 21:23 ` Kim F. Storm
2004-11-08 22:05 ` Kevin Rodgers
2004-11-08 23:54 ` Nick Roberts
2004-11-09 0:12 ` Luc Teirlinck
2004-11-09 0:35 ` Luc Teirlinck
2004-11-09 1:27 ` Luc Teirlinck
2004-11-09 14:11 ` Kim F. Storm [this message]
2004-11-09 17:55 ` Kevin Rodgers
2004-11-10 16:09 ` Richard Stallman
2004-11-09 21:29 ` Richard Stallman
2004-11-09 22:58 ` Luc Teirlinck
2004-11-10 0:02 ` Stefan Monnier
2004-11-10 0:08 ` Luc Teirlinck
2004-11-11 3:14 ` Richard Stallman
2004-11-09 23:22 ` Kim F. Storm
2004-11-09 21:29 ` Richard Stallman
2004-11-10 11:45 ` Nick Roberts
2004-11-08 16:59 ` Richard Stallman
2004-11-09 4:28 ` Eli Zaretskii
2004-11-09 14:20 ` Kim F. Storm
2004-11-10 16:08 ` Richard Stallman
2004-11-09 21:30 ` Richard Stallman
2004-11-07 18:04 ` Richard Stallman
2004-11-08 12:47 ` Kim F. Storm
2004-11-08 14:55 ` Stefan
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=m3ekj3kt76.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=emacs-devel@gnu.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).