1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded.

This commit is contained in:
Po Lu 2023-12-05 18:37:11 +08:00
parent e670412a3e
commit 19a3b499f8

View file

@ -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,