diff options
| author | Po Lu | 2023-01-14 22:13:26 +0800 |
|---|---|---|
| committer | Po Lu | 2023-01-14 22:13:26 +0800 |
| commit | 9c6256df0d42f5b6be5ccd20a03a3b2803108b83 (patch) | |
| tree | 40469f68ec2ace2eddf605d50564013152e58977 /src | |
| parent | 2b87ab7b27163fbd7b6b64c5a44e26b0e692c00a (diff) | |
| parent | dce42f556177e4e0f15daccb3c2f27a47f2beebb (diff) | |
| download | emacs-9c6256df0d42f5b6be5ccd20a03a3b2803108b83.tar.gz emacs-9c6256df0d42f5b6be5ccd20a03a3b2803108b83.zip | |
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc.c | 34 |
1 files changed, 21 insertions, 13 deletions
| @@ -330,19 +330,7 @@ string is passed through `substitute-command-keys'. */) | |||
| 330 | xsignal1 (Qvoid_function, function); | 330 | xsignal1 (Qvoid_function, function); |
| 331 | if (CONSP (fun) && EQ (XCAR (fun), Qmacro)) | 331 | if (CONSP (fun) && EQ (XCAR (fun), Qmacro)) |
| 332 | fun = XCDR (fun); | 332 | fun = XCDR (fun); |
| 333 | #ifdef HAVE_NATIVE_COMP | 333 | doc = call1 (Qfunction_documentation, fun); |
| 334 | if (!NILP (Fsubr_native_elisp_p (fun))) | ||
| 335 | doc = native_function_doc (fun); | ||
| 336 | else | ||
| 337 | #endif | ||
| 338 | if (SUBRP (fun)) | ||
| 339 | doc = make_fixnum (XSUBR (fun)->doc); | ||
| 340 | #ifdef HAVE_MODULES | ||
| 341 | else if (MODULE_FUNCTIONP (fun)) | ||
| 342 | doc = module_function_documentation (XMODULE_FUNCTION (fun)); | ||
| 343 | #endif | ||
| 344 | else | ||
| 345 | doc = call1 (Qfunction_documentation, fun); | ||
| 346 | 334 | ||
| 347 | /* If DOC is 0, it's typically because of a dumped file missing | 335 | /* If DOC is 0, it's typically because of a dumped file missing |
| 348 | from the DOC file (bug in src/Makefile.in). */ | 336 | from the DOC file (bug in src/Makefile.in). */ |
| @@ -371,6 +359,25 @@ string is passed through `substitute-command-keys'. */) | |||
| 371 | return doc; | 359 | return doc; |
| 372 | } | 360 | } |
| 373 | 361 | ||
| 362 | DEFUN ("internal-subr-documentation", Fsubr_documentation, Ssubr_documentation, 1, 1, 0, | ||
| 363 | doc: /* Return the raw documentation info of a C primitive. */) | ||
| 364 | (Lisp_Object function) | ||
| 365 | { | ||
| 366 | #ifdef HAVE_NATIVE_COMP | ||
| 367 | if (!NILP (Fsubr_native_elisp_p (function))) | ||
| 368 | return native_function_doc (function); | ||
| 369 | else | ||
| 370 | #endif | ||
| 371 | if (SUBRP (function)) | ||
| 372 | return make_fixnum (XSUBR (function)->doc); | ||
| 373 | #ifdef HAVE_MODULES | ||
| 374 | else if (MODULE_FUNCTIONP (function)) | ||
| 375 | return module_function_documentation (XMODULE_FUNCTION (function)); | ||
| 376 | #endif | ||
| 377 | else | ||
| 378 | return Qt; | ||
| 379 | } | ||
| 380 | |||
| 374 | DEFUN ("documentation-property", Fdocumentation_property, | 381 | DEFUN ("documentation-property", Fdocumentation_property, |
| 375 | Sdocumentation_property, 2, 3, 0, | 382 | Sdocumentation_property, 2, 3, 0, |
| 376 | doc: /* Return the documentation string that is SYMBOL's PROP property. | 383 | doc: /* Return the documentation string that is SYMBOL's PROP property. |
| @@ -713,6 +720,7 @@ compute the correct value for the current terminal in the nil case. */); | |||
| 713 | /* Initialized by ‘main’. */ | 720 | /* Initialized by ‘main’. */ |
| 714 | 721 | ||
| 715 | defsubr (&Sdocumentation); | 722 | defsubr (&Sdocumentation); |
| 723 | defsubr (&Ssubr_documentation); | ||
| 716 | defsubr (&Sdocumentation_property); | 724 | defsubr (&Sdocumentation_property); |
| 717 | defsubr (&Ssnarf_documentation); | 725 | defsubr (&Ssnarf_documentation); |
| 718 | defsubr (&Stext_quoting_style); | 726 | defsubr (&Stext_quoting_style); |