[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/doc.c
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/doc.c |
Date: |
Tue, 04 Dec 2001 20:47:27 -0500 |
Index: emacs/src/doc.c
diff -c emacs/src/doc.c:1.87 emacs/src/doc.c:1.88
*** emacs/src/doc.c:1.87 Sat Nov 17 17:38:58 2001
--- emacs/src/doc.c Tue Dec 4 20:47:27 2001
***************
*** 81,86 ****
--- 81,87 ----
static int get_doc_string_buffer_size;
static unsigned char *read_bytecode_pointer;
+ Lisp_Object Fsnarf_documentation P_ ((Lisp_Object));
/* readchar in lread.c calls back here to fetch the next byte.
If UNREADFLAG is 1, we unread a byte. */
***************
*** 134,145 ****
{
file = XCAR (filepos);
position = XINT (XCDR (filepos));
- if (position < 0)
- position = - position;
}
else
return Qnil;
if (!STRINGP (Vdoc_directory))
return Qnil;
--- 135,147 ----
{
file = XCAR (filepos);
position = XINT (XCDR (filepos));
}
else
return Qnil;
+ if (position < 0)
+ position = - position;
+
if (!STRINGP (Vdoc_directory))
return Qnil;
***************
*** 329,346 ****
else if ((EMACS_INT) XSUBR (fun)->doc >= 0)
doc = build_string (XSUBR (fun)->doc);
else
! doc = get_doc_string (make_number (- (EMACS_INT) XSUBR (fun)->doc),
! 0, 0);
}
else if (COMPILEDP (fun))
{
! if ((XVECTOR (fun)->size & PSEUDOVECTOR_SIZE_MASK) <=
COMPILED_DOC_STRING)
return Qnil;
! tem = XVECTOR (fun)->contents[COMPILED_DOC_STRING];
if (STRINGP (tem))
doc = tem;
else if (NATNUMP (tem) || CONSP (tem))
! doc = get_doc_string (tem, 0, 0);
else
return Qnil;
}
--- 331,347 ----
else if ((EMACS_INT) XSUBR (fun)->doc >= 0)
doc = build_string (XSUBR (fun)->doc);
else
! doc = make_number ((EMACS_INT) XSUBR (fun)->doc);
}
else if (COMPILEDP (fun))
{
! if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) <= COMPILED_DOC_STRING)
return Qnil;
! tem = AREF (fun, COMPILED_DOC_STRING);
if (STRINGP (tem))
doc = tem;
else if (NATNUMP (tem) || CONSP (tem))
! doc = tem;
else
return Qnil;
}
***************
*** 365,373 ****
doc = 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 (XCDR (tem1)))
! doc = get_doc_string (tem, 0, 0);
else
return Qnil;
}
--- 366,374 ----
doc = 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) && INTEGERP (XCDR (tem))))
! && !NILP (XCDR (tem1)))
! doc = tem;
else
return Qnil;
}
***************
*** 384,389 ****
--- 385,393 ----
Fsignal (Qinvalid_function, Fcons (fun, Qnil));
}
+ if (INTEGERP (doc) || CONSP (doc))
+ doc = get_doc_string (doc, 0, 0);
+
if (NILP (raw))
doc = Fsubstitute_command_keys (doc);
return doc;
***************
*** 404,412 ****
Lisp_Object tem;
tem = Fget (symbol, prop);
! if (INTEGERP (tem))
! tem = get_doc_string (XINT (tem) > 0 ? tem : make_number (- XINT (tem)),
0, 0);
! else if (CONSP (tem) && INTEGERP (XCDR (tem)))
tem = get_doc_string (tem, 0, 0);
else if (!STRINGP (tem))
/* Feval protects its argument. */
--- 408,414 ----
Lisp_Object tem;
tem = Fget (symbol, prop);
! if (INTEGERP (tem) || (CONSP (tem) && INTEGERP (XCDR (tem))))
tem = get_doc_string (tem, 0, 0);
else if (!STRINGP (tem))
/* Feval protects its argument. */
***************
*** 454,461 ****
{
/* This bytecode object must have a slot for the
docstring, since we've found a docstring for it. */
! if ((XVECTOR (fun)->size & PSEUDOVECTOR_SIZE_MASK) >
COMPILED_DOC_STRING)
! XSETFASTINT (XVECTOR (fun)->contents[COMPILED_DOC_STRING], offset);
}
}
--- 456,463 ----
{
/* This bytecode object must have a slot for the
docstring, since we've found a docstring for it. */
! if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) > COMPILED_DOC_STRING)
! XSETFASTINT (AREF (fun, COMPILED_DOC_STRING), offset);
}
}
- [Emacs-diffs] Changes to emacs/src/doc.c,
Stefan Monnier <=