diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-06-26 16:25:19 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-06-26 16:25:24 +0200 |
commit | 4b83e7d016ba8e9983c6fd0e154bfa9e22481958 (patch) | |
tree | cd5ce4a9a3625ecce195225765088dd6f41803b3 | |
parent | 0b4e003766f15225dede9bdba4ead33e493856e2 (diff) | |
download | emacs-4b83e7d016ba8e9983c6fd0e154bfa9e22481958.tar.gz |
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).
-rw-r--r-- | src/doc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/doc.c b/src/doc.c index 3fa0eaac202..bc05d09df48 100644 --- a/src/doc.c +++ b/src/doc.c @@ -436,8 +436,20 @@ aren't strings. */) documentation_property: tem = Fget (symbol, prop); + + /* If we don't have any documentation for this symbol, try to see whether + it's an indirect variable and get the documentation from there instead. */ + if (NILP (tem)) + { + Lisp_Object indirect = Findirect_variable (symbol); + if (!NILP (indirect)) + tem = Fget (indirect, prop); + } + if (EQ (tem, make_fixnum (0))) tem = Qnil; + + /* See if we want to look for the string in the DOC file. */ if (FIXNUMP (tem) || (CONSP (tem) && FIXNUMP (XCDR (tem)))) { Lisp_Object doc = tem; |