Subject: bug#59658: native-compile-prune-cache deletes *.eln files in the build's native-lisp directories

From: Eli Zaretskii <[email-masked]>
Date: Mon, 28 Nov 2022 16:46:32 +0200

> From: Juanma Barranquero <[email-masked]>
> Date: Mon, 28 Nov 2022 15:11:10 +0100
> 
> This is on Windows, and running Emacs in-place after building from trunk (no installation).
> 
> If you have several VERSION-xxxxxxxx directories under native-lisp/ and do 
> 
> M-x native-compile-prune-cache <RET>
> 
> this deletes any .eln files in the VERSION-xxxxxxxx directories of the stale caches. Their preloaded/
> subdirectories and content are not affected.
> 
> Presumably this should skip the last entry in native-comp-eln-load-path, which is documented as being
> "assumed to be the system one".

Yes, I think it should skip the last entry.  AFAIR, that was the intent with
this command, in which case what it does now is an oversight of sorts.