From: Lars Ingebrigtsen Date: Wed, 26 Jun 2019 14:25:19 +0000 (+0200) Subject: Fdocumentation_property: Return doc string for indirect variables X-Git-Tag: emacs-27.0.90~2203^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4b83e7d016ba8e9983c6fd0e154bfa9e22481958;p=emacs.git 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). --- 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;