diff options
| author | Po Lu | 2023-12-05 18:37:11 +0800 |
|---|---|---|
| committer | Po Lu | 2023-12-05 18:37:11 +0800 |
| commit | 19a3b499f84b70019f0316c85c19a6a808516d80 (patch) | |
| tree | 969112177f4dc06e534f406b962c2192692a3727 | |
| parent | e670412a3e101e70dc26e021f467faece8cb7f6b (diff) | |
| download | emacs-19a3b499f84b70019f0316c85c19a6a808516d80.tar.gz emacs-19a3b499f84b70019f0316c85c19a6a808516d80.zip | |
; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded.
| -rw-r--r-- | lisp/loadup.el | 20 |
1 files 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 @@ | |||
| 393 | ;; from the repository. It is generated just after temacs is built. | 393 | ;; from the repository. It is generated just after temacs is built. |
| 394 | (load "leim/leim-list.el" t) | 394 | (load "leim/leim-list.el" t) |
| 395 | 395 | ||
| 396 | ;; Actively disallow advised functions during preload since: | 396 | (unless (featurep 'ls-lisp) |
| 397 | ;; - advices in Emacs's core are generally considered bad style; | 397 | ;; Actively disallow advised functions during preload since: |
| 398 | ;; - `Snarf-documentation' looses docstrings of primitives advised | 398 | ;; - advices in Emacs's core are generally considered bad style; |
| 399 | ;; during preload (bug#66032#20). | 399 | ;; - `Snarf-documentation' looses docstrings of primitives advised |
| 400 | (mapatoms | 400 | ;; during preload (bug#66032#20). |
| 401 | (lambda (f) | 401 | ;; |
| 402 | (and (advice--p (symbol-function f)) | 402 | ;; Don't verify this under MS-Windows and Android, both systems that |
| 403 | (error "Preload advice on %s" f)))) | 403 | ;; load ls-lisp, which advises insert-directory. |
| 404 | (mapatoms | ||
| 405 | (lambda (f) | ||
| 406 | (and (advice--p (symbol-function f)) | ||
| 407 | (error "Advice installed on preloaded function %s" f))))) | ||
| 404 | 408 | ||
| 405 | ;; If you want additional libraries to be preloaded and their | 409 | ;; If you want additional libraries to be preloaded and their |
| 406 | ;; doc strings kept in the DOC file rather than in core, | 410 | ;; doc strings kept in the DOC file rather than in core, |