diff options
| author | Lars Ingebrigtsen | 2019-06-26 16:25:19 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-26 16:25:24 +0200 |
| commit | 4b83e7d016ba8e9983c6fd0e154bfa9e22481958 (patch) | |
| tree | cd5ce4a9a3625ecce195225765088dd6f41803b3 /src/doc.c | |
| parent | 0b4e003766f15225dede9bdba4ead33e493856e2 (diff) | |
| download | emacs-4b83e7d016ba8e9983c6fd0e154bfa9e22481958.tar.gz emacs-4b83e7d016ba8e9983c6fd0e154bfa9e22481958.zip | |
Fdocumentation_property: Return doc string for indirect variables
* src/doc.c (Fdocumentation_property): When dealing with indirect
variables (i.e., aliases), also check the symbol being pointed to
for the doc string (bug #17180).
Diffstat (limited to 'src/doc.c')
| -rw-r--r-- | src/doc.c | 12 |
1 files changed, 12 insertions, 0 deletions
| @@ -436,8 +436,20 @@ aren't strings. */) | |||
| 436 | documentation_property: | 436 | documentation_property: |
| 437 | 437 | ||
| 438 | tem = Fget (symbol, prop); | 438 | tem = Fget (symbol, prop); |
| 439 | |||
| 440 | /* If we don't have any documentation for this symbol, try to see whether | ||
| 441 | it's an indirect variable and get the documentation from there instead. */ | ||
| 442 | if (NILP (tem)) | ||
| 443 | { | ||
| 444 | Lisp_Object indirect = Findirect_variable (symbol); | ||
| 445 | if (!NILP (indirect)) | ||
| 446 | tem = Fget (indirect, prop); | ||
| 447 | } | ||
| 448 | |||
| 439 | if (EQ (tem, make_fixnum (0))) | 449 | if (EQ (tem, make_fixnum (0))) |
| 440 | tem = Qnil; | 450 | tem = Qnil; |
| 451 | |||
| 452 | /* See if we want to look for the string in the DOC file. */ | ||
| 441 | if (FIXNUMP (tem) || (CONSP (tem) && FIXNUMP (XCDR (tem)))) | 453 | if (FIXNUMP (tem) || (CONSP (tem) && FIXNUMP (XCDR (tem)))) |
| 442 | { | 454 | { |
| 443 | Lisp_Object doc = tem; | 455 | Lisp_Object doc = tem; |