Mercurial > emacs
diff src/doc.c @ 13521:13e55327ef5e
(Fdocumentation): Reject a file reference
at the end of a lambda body.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 11 Nov 1995 23:48:53 +0000 |
parents | 23281af757c9 |
children | a45a97ebdf1c |
line wrap: on
line diff
--- 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;