Commit 4b83e7d0 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

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).
parent 0b4e0037
......@@ -436,8 +436,20 @@ aren't strings. */)
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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment