From: Richard M. Stallman Date: Sat, 11 Nov 1995 23:48:53 +0000 (+0000) Subject: (Fdocumentation): Reject a file reference X-Git-Tag: emacs-19.34~2339 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ae44f7a443877676e3c432099df2e54f06834417;p=emacs.git (Fdocumentation): Reject a file reference at the end of a lambda body. --- diff --git a/src/doc.c b/src/doc.c index 31ad2ef0d21..9801b961912 100644 --- a/src/doc.c +++ b/src/doc.c @@ -309,10 +309,15 @@ subcommands.)"); 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;