[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 5e43955 1/2: Don't declare vc-exec-after anymor
From: |
Eli Zaretskii |
Subject: |
Re: [Emacs-diffs] master 5e43955 1/2: Don't declare vc-exec-after anymore |
Date: |
Fri, 23 Oct 2015 10:29:17 +0300 |
> Date: Thu, 22 Oct 2015 18:04:39 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden
>
> FWIW, on my system I see that warning with all the vc-*.el files that
> call vc-run-delayed. The only exception is vc-svn.el, and the reason
> is this single line:
>
> (autoload 'vc-expand-dirs "vc")
>
> If you remove it, the warning will appear in vc-svn.el as well.
> (Loading vc loads vc-dispatcher as a side effect.)
>
> Another data point: replace this:
>
> (eval-when-compile (require 'vc))
>
> with this:
>
> (require 'vc)
>
> and the warning also goes way. So evidently there's some difference
> between these two, or maybe a byte-compiler bug.
I think bug#21724 supplies an answer: eval-when-compile makes this
function known _at_compile_time_, but the warning says it might not be
known _at_run_time_.
IOW, for a macro it is enough to use eval-when-compile, but if that
macro calls a function, the function should be either auto-loaded, or
the package that defines that function should be require'd.
Does this make sense?