1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 04:30:45 -08:00
emacs/doc
Stefan Monnier 39e8fd357d OClosure: New function function-documentation
As mentioned in the original OClosure commit, OClosures (ab)use the
bytecode's docstring slot to hold the OClosure's type.  This currently
prevents OClosures from having their own docstring.

Introduce a new generic function `function-documentation` to fetch the
docstring of a function, which can then be implemented in various
different ways depending on the OClosure's type.

* lisp/simple.el (function-documentation): New generic function.
(bad-package-check): Strength-reduce `eval` to `symbol-value`.
* src/doc.c (Fdocumentation): Use it.

* lisp/emacs-lisp/oclosure.el (oclosure--accessor-docstring): New function.
* test/lisp/emacs-lisp/oclosure-tests.el (oclosure-test):
Add test for accessor's docstrings.
2022-04-07 15:59:09 -04:00
..
emacs Add user options to move point and scroll window during DND 2022-04-03 09:14:24 +08:00
lispintro Make the eintr.html target match what's on the web 2022-02-07 04:58:49 +01:00
lispref OClosure: New function function-documentation 2022-04-07 15:59:09 -04:00
man Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
misc Add a mu backend for gnus-search 2022-04-07 13:14:01 +02:00