]> git.eshelyaron.com Git - emacs.git/commit
nadvice.el: Use OClosures rather than handmade bytecodes
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 18 Dec 2021 15:28:57 +0000 (10:28 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 18 Dec 2021 15:28:57 +0000 (10:28 -0500)
commit5574871ec74b037373f6ddd69460b923e23b9b76
tree87bc3e797df00e8220a8c0f31a1435bf6aea5426
parenta444d859770cb8b461f27870d3c95e03edbbe8d7
nadvice.el: Use OClosures rather than handmade bytecodes

* lisp/emacs-lisp/nadvice.el (advice): New OClosure type.
(advice--where-alist): Use OClosures.
(advice--car, advice--cdr, advice--props, advice--where):
Delete functions, now defined for us by `oclosure-define`.
(advice--p): Rewrite.
(advice--make-1): Delete function.
(advice--make, advice--tweak): Use `advice--copy` instead.

* lisp/emacs-lisp/oclosure.el (oclosure--fix-type): Don't use `documentation` to
avoid bootstrap problems.
(oclosure-type): Return nil on non-function objects.

* lisp/help.el (help--docstring-quote, help-add-fundoc-usage)
(help--make-usage, help--make-usage-docstring): Move to `subr.el`.

* lisp/subr.el (docstring--quote, docstring-add-fundoc-usage)
(docstring--make-usage, docstring--make-usage-docstring): New names for
functions moved from `help.el` for bootstrap reasons.

* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda): Use the new names.
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/nadvice.el
lisp/emacs-lisp/oclosure.el
lisp/help.el
lisp/subr.el