bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#67005: 30.0.50; improve nadivce/comp/trampoline handling


From: Jens Schmidt
Subject: bug#67005: 30.0.50; improve nadivce/comp/trampoline handling
Date: Sat, 25 Nov 2023 13:41:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> How would one warn during bootstrap?
>
> `message`

That simple.

>> And would this be noticed?
>
> Yes.  The build should not emit any warning, so unless the warning is
> particularly discrete, we do notice it.

What about this one?  Too indiscrete?

  (when purify-flag
    (message "\a\nWarning: Invalid pre-dump advice on %s\n" symbol))


Plus another idea: Instead of placing the test into `advice-add', how
about checking functions for advices in loadup.el?  We could place that
check just before site-load.el gets loaded, to avoid trouble for Emacs
modders.  I tried the following, and it seemed to do the trick:

diff --git a/lisp/loadup.el b/lisp/loadup.el
index 07895228d0d..49d675dc5cb 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -393,6 +393,11 @@
 ;; from the repository.  It is generated just after temacs is built.
 (load "leim/leim-list.el" t)

+(mapatoms
+ (lambda (f)
+   (and (advice--p (symbol-function f))
+        (error "Pre-dump advice on %s" f))))
+
 ;; If you want additional libraries to be preloaded and their
 ;; doc strings kept in the DOC file rather than in core,
 ;; you may load them with a "site-load.el" file.


Thanks.





reply via email to

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