all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: pacifying "might not be defined at runtime" warning
Date: Mon, 09 May 2016 08:20:29 -0400	[thread overview]
Message-ID: <jwvlh3ja0rg.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 573031FB.8090709@cs.ucla.edu

> "cd lisp; make compile-always" generates several "might not be defined at
> runtime" warnings in the master branch. For example, it generates the attached
> warnings in lisp/vc.

[ Note: when I say "vc.el" below, it includes generic VC
  files other than vc-hooks.el, such as vc-dispatch.el.  ]

The vc-<backend>.el files provide implementations for the functions used
in vc-hooks.el as well as for those used in vc.el.

In the parts that implement the vc.el functionality, it's "perfectly
safe" to call functions provided by vc.el, since they're supposed to
only be used *from* vc.el (i.e. when vc.el is already loaded).

> Is there some reason we shouldn't add directives like
> (require 'vc) to pacify the byte compiler here? (See the 2nd attachment.)

The reason is that vc-<backend>.el is autoloaded as soon as you visit
a file that's managed by <backend>, even if you never have and never
will use VC, so a (require 'vc) in those files would load VC
too eagerly.


        Stefan




  reply	other threads:[~2016-05-09 12:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-09  6:45 pacifying "might not be defined at runtime" warning Paul Eggert
2016-05-09 12:20 ` Stefan Monnier [this message]
2016-05-09 16:35   ` Paul Eggert
2016-05-09 16:37     ` Dmitry Gutov
2016-05-09 16:40     ` Eli Zaretskii
2016-05-09 17:34       ` Paul Eggert
2016-05-09 18:03         ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvlh3ja0rg.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.