summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2017-04-22 18:04:29 +0200
committerPhilipp <phst@google.com>2017-05-06 21:29:08 +0200
commita3e9694078e24d19db860aa4ff8dec8bc34b59b7 (patch)
tree235bf0857ebe0011ffd0b9cbef5f8daa242efbc1 /src/print.c
parent5e47c2e52b9b7616668c5586084e0128b231272a (diff)
downloademacs-a3e9694078e24d19db860aa4ff8dec8bc34b59b7.tar.gz
Introduce new misc type for module function
This resolves a couple of FIXMEs in emacs-module.c. * src/lisp.h (MODULE_FUNCTIONP, XMODULE_FUNCTION): New functions. * src/alloc.c (make_module_function): New function. (mark_object): GC support. * src/data.c (Ftype_of, syms_of_data): Handle module function type. * src/print.c (print_object): Print support for new type. * src/emacs-module.c (module_make_function, Finternal_module_call): Use new module function type, remove FIXMEs. (module_format_fun_env): Adapt and give it external linkage. * test/src/emacs-module-tests.el (module-function-object): Add unit test.
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/print.c b/src/print.c
index 872103bd4c2..7e411a80c88 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2103,6 +2103,11 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
printchar ('>', printcharfun);
break;
}
+
+ case Lisp_Misc_Module_Function:
+ print_string (module_format_fun_env (XMODULE_FUNCTION (obj)),
+ printcharfun);
+ break;
#endif
case Lisp_Misc_Finalizer: