aboutsummaryrefslogtreecommitdiffstats
path: root/src/doc.c
diff options
context:
space:
mode:
authorPaul Eggert2011-03-15 16:30:07 -0700
committerPaul Eggert2011-03-15 16:30:07 -0700
commita415e6946f76faecb98cb07ecd42ecdbcca5b7a4 (patch)
tree45fe2b5f82a0a5ec83cce45dda350c4a6d9b5753 /src/doc.c
parent527469183746cf04ee8212f9debc96e56f4748be (diff)
downloademacs-a415e6946f76faecb98cb07ecd42ecdbcca5b7a4.tar.gz
emacs-a415e6946f76faecb98cb07ecd42ecdbcca5b7a4.zip
* doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
avoid shadowing.
Diffstat (limited to 'src/doc.c')
-rw-r--r--src/doc.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/src/doc.c b/src/doc.c
index e572d43dbf4..1ed9949e52c 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -322,17 +322,20 @@ string is passed through `substitute-command-keys'. */)
322{ 322{
323 Lisp_Object fun; 323 Lisp_Object fun;
324 Lisp_Object funcar; 324 Lisp_Object funcar;
325 Lisp_Object tem, doc; 325 Lisp_Object doc;
326 int try_reload = 1; 326 int try_reload = 1;
327 327
328 documentation: 328 documentation:
329 329
330 doc = Qnil; 330 doc = Qnil;
331 331
332 if (SYMBOLP (function) 332 if (SYMBOLP (function))
333 && (tem = Fget (function, Qfunction_documentation), 333 {
334 !NILP (tem))) 334 Lisp_Object tem = Fget (function, Qfunction_documentation);
335 return Fdocumentation_property (function, Qfunction_documentation, raw); 335 if (!NILP (tem))
336 return Fdocumentation_property (function, Qfunction_documentation,
337 raw);
338 }
336 339
337 fun = Findirect_function (function, Qnil); 340 fun = Findirect_function (function, Qnil);
338 if (SUBRP (fun)) 341 if (SUBRP (fun))
@@ -348,13 +351,16 @@ string is passed through `substitute-command-keys'. */)
348 { 351 {
349 if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) <= COMPILED_DOC_STRING) 352 if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) <= COMPILED_DOC_STRING)
350 return Qnil; 353 return Qnil;
351 tem = AREF (fun, COMPILED_DOC_STRING);
352 if (STRINGP (tem))
353 doc = tem;
354 else if (NATNUMP (tem) || CONSP (tem))
355 doc = tem;
356 else 354 else
357 return Qnil; 355 {
356 Lisp_Object tem = AREF (fun, COMPILED_DOC_STRING);
357 if (STRINGP (tem))
358 doc = tem;
359 else if (NATNUMP (tem) || CONSP (tem))
360 doc = tem;
361 else
362 return Qnil;
363 }
358 } 364 }
359 else if (STRINGP (fun) || VECTORP (fun)) 365 else if (STRINGP (fun) || VECTORP (fun))
360 { 366 {
@@ -370,9 +376,8 @@ string is passed through `substitute-command-keys'. */)
370 else if (EQ (funcar, Qlambda) 376 else if (EQ (funcar, Qlambda)
371 || EQ (funcar, Qautoload)) 377 || EQ (funcar, Qautoload))
372 { 378 {
373 Lisp_Object tem1; 379 Lisp_Object tem1 = Fcdr (Fcdr (fun));
374 tem1 = Fcdr (Fcdr (fun)); 380 Lisp_Object tem = Fcar (tem1);
375 tem = Fcar (tem1);
376 if (STRINGP (tem)) 381 if (STRINGP (tem))
377 doc = tem; 382 doc = tem;
378 /* Handle a doc reference--but these never come last 383 /* Handle a doc reference--but these never come last
@@ -539,7 +544,7 @@ the same file name is found in the `doc-directory'. */)
539 char buf[1024 + 1]; 544 char buf[1024 + 1];
540 register EMACS_INT filled; 545 register EMACS_INT filled;
541 register EMACS_INT pos; 546 register EMACS_INT pos;
542 register char *p, *end; 547 register char *p;
543 Lisp_Object sym; 548 Lisp_Object sym;
544 char *name; 549 char *name;
545 int skip_file = 0; 550 int skip_file = 0;
@@ -598,6 +603,7 @@ the same file name is found in the `doc-directory'. */)
598 pos = 0; 603 pos = 0;
599 while (1) 604 while (1)
600 { 605 {
606 register char *end;
601 if (filled < 512) 607 if (filled < 512)
602 filled += emacs_read (fd, &buf[filled], sizeof buf - 1 - filled); 608 filled += emacs_read (fd, &buf[filled], sizeof buf - 1 - filled);
603 if (!filled) 609 if (!filled)