On Sat, Oct 06, 2018 at 06:55:54PM +0200, Garreau, Alexandre wrote: > On 2018-10-06 at 10:40, Stefan Monnier wrote: > >> What you're describing is called inline expansion. > >> AFAIK, the Elisp compiler doesn't do this automatically. > > > > Indeed, it doesn't do it automatically because it doesn't know how to > > (automatically) undo it, and it has visible effects w.r.t advice, > > debug-on-entry, etc... > > Why “undo”? [...] because... - when debugging, you want to know that function "foo" is being called - you want, perhaps, to advice/instrument the function after its entrails have been spread across some other byte code - because you expect it to be possible to redefine the function at run time (the run time system would have to know how to excise the inlined and perhaps optimised bits and pieces and replace them by something else) > Or would “reevaluate every function that where defined with the > (now-redefined) inlined function inside” work too? Hmm. Not reevaluate, but recompile, and not "inside", but rather "outside" -- like finding all places where this function was inlined and do some magic there. Perhaps doable, but not trivial. Cheers -- t