unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Emacs Development <Emacs-devel@gnu.org>
Subject: pacifying "might not be defined at runtime" warning
Date: Sun, 8 May 2016 23:45:15 -0700	[thread overview]
Message-ID: <573031FB.8090709@cs.ucla.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 347 bytes --]

"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. Is there some reason we shouldn't add directives like
(require 'vc) to pacify the byte compiler here? (See the 2nd attachment.)
Similarly for other warnings like this.

[-- Attachment #2: vc-warnings.txt --]
[-- Type: text/plain, Size: 852 bytes --]

  ELC      vc/vc-bzr.elc

In end of data:
vc/vc-bzr.el:1336:1:Warning: the function ‘vc-deduce-fileset’ might not be
    defined at runtime.
  ELC      vc/vc-cvs.elc

In end of data:
vc/vc-cvs.el:1319:1:Warning: the following functions might not be defined at
    runtime: vc-read-revision, vc-branch-p, vc-expand-dirs, vc-checkout
  ELC      vc/vc-hg.elc

In end of data:
vc/vc-hg.el:1400:1:Warning: the function ‘vc-compilation-mode’ might not be
    defined at runtime.
  ELC      vc/vc-rcs.elc

In end of data:
vc/vc-rcs.el:1446:1:Warning: the following functions might not be defined at
    runtime: vc-read-revision, vc-branch-p, vc-buffer-context,
    vc-restore-buffer-context, vc-setup-buffer
  ELC      vc/vc-src.elc

In end of data:
vc/vc-src.el:314:1:Warning: the function ‘vc-setup-buffer’ might not be
    defined at runtime.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: vc.diff --]
[-- Type: text/x-diff; name="vc.diff", Size: 1504 bytes --]

diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 03c134a..ffea8d2 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -45,6 +45,8 @@ vc-bzr-checkout-model
 
 ;;; Code:
 
+(require 'vc)
+
 (eval-when-compile
   (require 'cl-lib)
   (require 'vc-dispatcher)
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 2dca708..d8f7bcf 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -25,7 +25,7 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'vc))
+(require 'vc)
 
 ;; Clear up the cache to force vc-call to check again and discover
 ;; new functions when we reload this file.
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 5fb93bc..e87a3ce 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -101,6 +101,8 @@
 
 ;;; Code:
 
+(require 'vc-dispatcher)
+
 (eval-when-compile
   (require 'cl-lib)
   (require 'vc)
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index b972956..99c3c20 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -37,9 +37,10 @@
 ;;; Customization options
 ;;;
 
+(require 'vc)
+
 (eval-when-compile
-  (require 'cl-lib)
-  (require 'vc))
+  (require 'cl-lib))
 
 (defgroup vc-rcs nil
   "VC RCS backend."
diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el
index 2329042..7bb5d0e 100644
--- a/lisp/vc/vc-src.el
+++ b/lisp/vc/vc-src.el
@@ -81,6 +81,8 @@
 ;;; Customization options
 ;;;
 
+(require 'vc-dispatcher)
+
 (eval-when-compile
   (require 'cl-lib)
   (require 'vc))

             reply	other threads:[~2016-05-09  6:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-09  6:45 Paul Eggert [this message]
2016-05-09 12:20 ` pacifying "might not be defined at runtime" warning Stefan Monnier
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

  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=573031FB.8090709@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --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).