diff options
author | Andrea Corallo <akrl@sdf.org> | 2019-12-07 11:28:21 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-01-01 11:38:11 +0100 |
commit | f4de790beec514808eafd1cb22fa5eacdecd4552 (patch) | |
tree | 0c14d43cd7313875a9730a3834de30d59ef40aaf /src/doc.c | |
parent | e05253cb9bc4a35c7dedc3cbb2830e37d385a339 (diff) | |
download | emacs-f4de790beec514808eafd1cb22fa5eacdecd4552.tar.gz emacs-f4de790beec514808eafd1cb22fa5eacdecd4552.tar.bz2 emacs-f4de790beec514808eafd1cb22fa5eacdecd4552.zip |
add native compiled function docstring support
Diffstat (limited to 'src/doc.c')
-rw-r--r-- | src/doc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/doc.c b/src/doc.c index 285c0dbbbee..369997a3db4 100644 --- a/src/doc.c +++ b/src/doc.c @@ -335,6 +335,11 @@ string is passed through `substitute-command-keys'. */) xsignal1 (Qvoid_function, function); if (CONSP (fun) && EQ (XCAR (fun), Qmacro)) fun = XCDR (fun); +#ifdef HAVE_NATIVE_COMP + if (!NILP (Fsubr_native_elisp_p (fun))) + doc = XSUBR (fun)->native_doc; + else +#endif if (SUBRP (fun)) doc = make_fixnum (XSUBR (fun)->doc); #ifdef HAVE_MODULES @@ -508,7 +513,12 @@ store_function_docstring (Lisp_Object obj, EMACS_INT offset) /* Lisp_Subrs have a slot for it. */ else if (SUBRP (fun)) - XSUBR (fun)->doc = offset; + { +#ifdef HAVE_NATIVE_COMP + eassert (NILP (Fsubr_native_elisp_p (fun))); +#endif + XSUBR (fun)->doc = offset; + } /* Bytecode objects sometimes have slots for it. */ else if (COMPILEDP (fun)) |