Let's assume there is a package P
containing two files,
P/base.el
P/utils.el
, where the base.el
file requires utils.el
at runtime and utils.el
contains a macro M
. Upon first installation of P
, package.el downloads, extracts and compiles it.
Now assume the package maintainer updated P
to P'
and in the process modified M
to M'
. The package user now attempts to update his package via package-list. Since P
is a useful package, it is also loaded. Again package.el downloads and extracts P'
. But I don't see how the code from the updated macro M'
gets into the compiled file P'/base.el
, since the feature utils.el
is already provided, so, I assume, and the compiler is happy to use the old definition M
.
The question I have about this is simply whether this is a correct analysis ?
(require 'package)
will actually re-load and re-evaluate the package if the file is newer. So the macro definition is likely to be updated. However, the places where expansion already happened will not be updated.require
(at least as at 24.4.1) performs any such check. If the feature was registered as having been loaded, I believe that's all that matters.load
ing the recompiled library would resolve the issue, and it's certainly possible that the package manager does exactly that after updating libraries which were previously loaded.