[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prickliness of the "invalid byte code" stuff

From: Stefan Monnier
Subject: Re: Prickliness of the "invalid byte code" stuff
Date: Mon, 17 Jun 2019 09:32:17 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> From my experience, if you byte-compile an already loaded file, then
> calling functions from that file raises the afore-mentioned error ---
> because of byte-compile-dynamic. If you then do M-x load-library of the
> recompiled file, then life continues as normal in the running
> session. My thought was that if we  could detect this specific case,
> then we could as well have emacs load that file, rather than having the
> user reload it by hand.

Yes, that usually works, but unless we reorganize the current code, we
end up having to solve a slightly different problem similar to:

    (setq sm-foo (indirect-function '<pkg>-<fun>))
    (load "<pkg>")
    (funcall sm-foo <args>)

this will still burp because reloading <pkg> redefined <pkg>-<fun> but
it did not update `sm-foo` accordingly.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]