# HG changeset patch # User Richard M. Stallman # Date 816133733 0 # Node ID 13e55327ef5e94d299d512674d5578043fd5cc52 # Parent 8c7a3533a6888a0a156da921a506bf4bd9d9a662 (Fdocumentation): Reject a file reference at the end of a lambda body. diff -r 8c7a3533a688 -r 13e55327ef5e src/doc.c --- a/src/doc.c Sat Nov 11 23:48:29 1995 +0000 +++ b/src/doc.c Sat Nov 11 23:48:53 1995 +0000 @@ -309,10 +309,15 @@ else if (EQ (funcar, Qlambda) || EQ (funcar, Qautoload)) { - tem = Fcar (Fcdr (Fcdr (fun))); + Lisp_Object tem1; + tem1 = Fcdr (Fcdr (fun)); + tem = Fcar (tem1); if (STRINGP (tem)) doc = tem; - else if (NATNUMP (tem) || CONSP (tem)) + /* Handle a doc reference--but these never come last + in the function body, so reject them if they are last. */ + else if ((NATNUMP (tem) || CONSP (tem)) + && ! NILP (XCONS (tem1)->cdr)) doc = get_doc_string (tem); else return Qnil;