]> git.eshelyaron.com Git - emacs.git/commit
Add facility to make module functions interactive (Bug#23486).
authorPhilipp Stephani <phst@google.com>
Sun, 13 Sep 2020 18:21:41 +0000 (20:21 +0200)
committerPhilipp Stephani <phst@google.com>
Sun, 13 Sep 2020 18:26:47 +0000 (20:26 +0200)
commitda0e75e7410226d7fd6d760f0ebe8a04d815506d
tree1c850a5c13e3af18b7ca8cfe1b785d51300d9dde
parent3eb4e0db5ce247f8396daac3156087fbb7aefbd4
Add facility to make module functions interactive (Bug#23486).

* src/module-env-28.h: Add field for 'make_interactive' function.

* src/emacs-module.c (Lisp_Module_Function): Add new field holding the
interactive form.
(allocate_module_function): Adapt to structure layout change.
(module_make_interactive, module_function_interactive_form): New
functions.
(initialize_environment): Use them.

* src/eval.c (Fcommandp):
* src/data.c (Finteractive_form): Also handle interactive module
functions.

* test/data/emacs-module/mod-test.c (Fmod_test_identity): New test
function.
(emacs_module_init): Create two interactive module test functions.

* test/src/emacs-module-tests.el (module/interactive/return-t)
(module/interactive/return-t-int, module/interactive/identity):
New unit tests.

* doc/lispref/internals.texi (Module Functions): Document new
function.  Rework paragraph about wrapping module functions, as the
example no longer applies.

* etc/NEWS: Document new facility.
doc/lispref/internals.texi
etc/NEWS
src/data.c
src/emacs-module.c
src/eval.c
src/lisp.h
src/module-env-28.h
test/data/emacs-module/mod-test.c
test/src/emacs-module-tests.el