emacs-devel
[Top][All Lists]
Advanced

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

Re: master 05d240997a 2/2: Add native-compile-prune-cache command


From: Eli Zaretskii
Subject: Re: master 05d240997a 2/2: Add native-compile-prune-cache command
Date: Fri, 22 Jul 2022 21:03:44 +0300

> From: Robert Pluim <rpluim@gmail.com>
> Cc: akrl@sdf.org,  emacs-devel@gnu.org,  larsi@gnus.org
> Date: Fri, 22 Jul 2022 18:41:40 +0200
> 
> >>>>> On Fri, 22 Jul 2022 19:18:19 +0300, Eli Zaretskii <eliz@gnu.org> said:
> 
>     >> From: Robert Pluim <rpluim@gmail.com>
>     >> Cc: akrl@sdf.org,  emacs-devel@gnu.org,  larsi@gnus.org
>     >> Date: Fri, 22 Jul 2022 17:46:07 +0200
>     >> 
>     >> >>>>> On Fri, 22 Jul 2022 18:41:09 +0300, Eli Zaretskii <eliz@gnu.org> 
> said:
>     >> 
>     >> >> From: Robert Pluim <rpluim@gmail.com>
>     >> >> Cc: emacs-devel@gnu.org,  Lars Ingebrigtsen <larsi@gnus.org>
>     >> >> Date: Fri, 22 Jul 2022 17:36:16 +0200
>     >> >> 
>     >> >> Something like this (untested) in `normal-top-level'?
>     >> >> 
>     >> >> (unless (featurep 'native-compile)
>     >> >> (with-eval-after-load 'comp
>     >> >> (display-warning 'comp "This emacs does not support native 
> compilation" :warning)))
>     >> 
>     Eli> Why do we need this, again?
>     >> 
>     >> I had comp.el loaded in my non-native compile capable Emacs, and tried
>     >> to run `native-compile-prune-cacheʼ, which gave me an error. Either we
>     >> accept that I did something that shouldnʼt be done, or we try to warn
>     >> people that they shouldnʼt do it (or on the gripping hand we add code
>     >> to check 'native-compile to a bunch of stuff in comp.el).
> 
>     Eli> What would be the reason to load comp.el in such a session?
> 
> User error. Some people might write (require ʼcomp) in their
> .emacs. Iʼm sure we can come up with lots of scenarios.

If we want to handle user error of loading the file, then placing the
code you suggested in comp.el itself would be TRT, I think.  Not in
startup.el.



reply via email to

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