mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
* lisp/loadup.el: Check advice after rmc.el; turn error into warning
This commit is contained in:
parent
040cba5d33
commit
3b1fd42732
1 changed files with 12 additions and 13 deletions
|
|
@ -391,19 +391,6 @@
|
|||
;; from the repository. It is generated just after temacs is built.
|
||||
(load "leim/leim-list.el" t)
|
||||
|
||||
(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,
|
||||
;; you may load them with a "site-load.el" file.
|
||||
|
|
@ -422,6 +409,18 @@ lost after dumping")))
|
|||
;; Used by `kill-buffer', for instance.
|
||||
(load "emacs-lisp/rmc")
|
||||
|
||||
;; Actively check for 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))
|
||||
;; Don't make it an error because it's not serious enough and
|
||||
;; it can be annoying during development. Also there are still
|
||||
;; circumstances where we use advice on preloaded functions.
|
||||
(message "Warning: Advice installed on preloaded function %S" f))))
|
||||
|
||||
;; Make sure default-directory is unibyte when dumping. This is
|
||||
;; because we cannot decode and encode it correctly (since the locale
|
||||
;; environment is not, and should not be, set up). default-directory
|
||||
|
|
|
|||
Loading…
Reference in a new issue