emacs-diffs
[Top][All Lists]
Advanced

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

master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-li


From: Po Lu
Subject: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded.
Date: Tue, 5 Dec 2023 05:39:37 -0500 (EST)

branch: master
commit 19a3b499f84b70019f0316c85c19a6a808516d80
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded.
---
 lisp/loadup.el | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/lisp/loadup.el b/lisp/loadup.el
index 3b58d5fb9b7..d447523dc42 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -393,14 +393,18 @@
 ;; from the repository.  It is generated just after temacs is built.
 (load "leim/leim-list.el" t)
 
-;; Actively disallow advised functions during preload since:
-;; - advices in Emacs's core are generally considered bad style;
-;; - `Snarf-documentation' looses docstrings of primitives advised
-;;   during preload (bug#66032#20).
-(mapatoms
- (lambda (f)
-   (and (advice--p (symbol-function f))
-        (error "Preload advice on %s" f))))
+(unless (featurep 'ls-lisp)
+  ;; Actively disallow advised functions during preload since:
+  ;; - advices in Emacs's core are generally considered bad style;
+  ;; - `Snarf-documentation' looses docstrings of primitives advised
+  ;;   during preload (bug#66032#20).
+  ;;
+  ;; Don't verify this under MS-Windows and Android, both systems that
+  ;; load ls-lisp, which advises insert-directory.
+  (mapatoms
+   (lambda (f)
+     (and (advice--p (symbol-function f))
+          (error "Advice installed on preloaded function %s" f)))))
 
 ;; If you want additional libraries to be preloaded and their
 ;; doc strings kept in the DOC file rather than in core,



reply via email to

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