From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: pacifying "might not be defined at runtime" warning
Date: Mon, 9 May 2016 10:34:34 -0700 [thread overview]
Message-ID: <d6617c96-3c82-5823-7d59-11f4793dcef0@cs.ucla.edu> (raw)
In-Reply-To: <83vb2nchgk.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
On 05/09/2016 09:40 AM, Eli Zaretskii wrote:
>> What is the recommended way to pacify the byte compiler in this
>> >situation?
> Does using declare-function help?
>
Yes, the attached patches suffice to pacify the byte compiler for the
source files under lisp/vc. If this is the recommended way to pacify,
I'll install them in master.
[-- Attachment #2: vc.diff --]
[-- Type: text/x-patch, Size: 2388 bytes --]
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 03c134a..4bcab66 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -50,6 +50,11 @@ vc-bzr-checkout-model
(require 'vc-dispatcher)
(require 'vc-dir)) ; vc-dir-at-event
+(declare-function vc-deduce-fileset "vc"
+ (&optional observer allow-unregistered
+ state-model-only-files))
+
+
;; Clear up the cache to force vc-call to check again and discover
;; new functions when we reload this file.
(put 'Bzr 'vc-functions nil)
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 2dca708..dfe6b29 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -27,6 +27,12 @@
(eval-when-compile (require 'vc))
+(declare-function vc-branch-p "vc" (rev))
+(declare-function vc-checkout "vc" (file &optional rev))
+(declare-function vc-expand-dirs "vc" (file-or-dir-list backend))
+(declare-function vc-read-revision "vc"
+ (prompt &optional files backend default initial-input))
+
;; Clear up the cache to force vc-call to check again and discover
;; new functions when we reload this file.
(put 'CVS 'vc-functions nil)
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 5fb93bc..78ff56c 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -106,6 +106,8 @@
(require 'vc)
(require 'vc-dir))
+(declare-function vc-compilation-mode "vc-dispatcher" (backend))
+
;;; Customization options
(defgroup vc-hg nil
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index b972956..fcb1849 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -41,6 +41,13 @@
(require 'cl-lib)
(require 'vc))
+(declare-function vc-branch-p "vc" (rev))
+(declare-function vc-read-revision "vc"
+ (prompt &optional files backend default initial-input))
+(declare-function vc-buffer-context "vc-dispatcher" ())
+(declare-function vc-restore-buffer-context "vc-dispatcher" (context))
+(declare-function vc-setup-buffer "vc-dispatcher" (buf))
+
(defgroup vc-rcs nil
"VC RCS backend."
:version "24.1"
diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el
index 2329042..8b82b56 100644
--- a/lisp/vc/vc-src.el
+++ b/lisp/vc/vc-src.el
@@ -85,6 +85,8 @@
(require 'cl-lib)
(require 'vc))
+(declare-function vc-setup-buffer "vc-dispatcher" (buf))
+
(defgroup vc-src nil
"VC SRC backend."
:version "25.1"
next prev parent reply other threads:[~2016-05-09 17:34 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
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 [this message]
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=d6617c96-3c82-5823-7d59-11f4793dcef0@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.