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: Andrea Corallo
Subject: Re: master 05d240997a 2/2: Add native-compile-prune-cache command
Date: Fri, 22 Jul 2022 16:50:24 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Robert Pluim <rpluim@gmail.com> writes:

>>>>>> On Fri, 22 Jul 2022 15:14:21 +0000, Andrea Corallo <akrl@sdf.org> said:
>
>     Andrea> Robert Pluim <rpluim@gmail.com> writes:
>     >>>>>>> On Fri, 22 Jul 2022 13:51:04 +0000, Andrea Corallo <akrl@sdf.org> 
> said:
>     >> >> Right. The question is if we want to support such a case (and if so,
>     >> >> exactly how).
>     >> 
>     Andrea> Yep, I really thought the answer was no, at least for now, but I 
> might
>     Andrea> be wrong.
>     >> 
>     Andrea> BTW assuming the answer is no, should we add a load time check 
> with
>     Andrea> associated error or warning for comp.el to gate all these possible
>     Andrea> issues?
>     >> 
>     >> Iʼd lean towards a warning myself (both for loading and for running
>     >> any of the commands inside comp.el)
>
>     Andrea> FWIW I'd probably go just for the load-time warning.  I fear 
> gating
>     Andrea> every function would probably bloat the code for not getting much 
> back.
>
> 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)))

Yes something similar, wouldn't the attached be simpler?

BR

  Andrea

>From 81bfe715e2137f0572bb17a51bdac3e4f8cd106d Mon Sep 17 00:00:00 2001
From: Andrea Corallo <akrl@sdf.org>
Date: Fri, 22 Jul 2022 18:46:33 +0200
Subject: [PATCH] * Warning the user if loading comp on a non native capable
 Emacs.

* lisp/emacs-lisp/comp.el: Warning the user if loading on a non native
capable Emacs.
---
 lisp/emacs-lisp/comp.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 9a635a4776..b9de0289ee 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -28,6 +28,10 @@
 
 ;;; Code:
 
+(unless (featurep 'native-compile)
+  (display-warning 'comp "This emacs does not support native compilation"
+                   :warning))
+
 (require 'bytecomp)
 (require 'cl-extra)
 (require 'cl-lib)
-- 
2.25.1


reply via email to

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