From: Lars Ingebrigtsen Date: Wed, 26 Jun 2019 14:41:07 +0000 (+0200) Subject: Restrict indirect lookups in Fdocumentation_property X-Git-Tag: emacs-27.0.90~2202 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8123f8cf9f38610d32b799cb1dd8893b56fc8a47;p=emacs.git Restrict indirect lookups in Fdocumentation_property * src/doc.c (Fdocumentation_property): Only look up indirect variables if we've been asked for the variable documentation. --- diff --git a/src/doc.c b/src/doc.c index bc05d09df48..8875360d6e6 100644 --- a/src/doc.c +++ b/src/doc.c @@ -437,9 +437,11 @@ 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)) + /* If we don't have any documentation for this symbol (and we're asking for + the variable documentation), try to see whether it's an indirect variable + and get the documentation from there instead. */ + if (EQ (prop, Qvariable_documentation) + && NILP (tem)) { Lisp_Object indirect = Findirect_variable (symbol); if (!NILP (indirect))