/[emacs]/emacs/src/data.c
ViewVC logotype

Diff of /emacs/src/data.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.202 by miles, Sun Oct 21 10:00:33 2001 UTC revision 1.203 by pj, Sun Oct 21 12:02:13 2001 UTC
# Line 177  sign_extend_lisp_int (num) Line 177  sign_extend_lisp_int (num)
177  /* Data type predicates */  /* Data type predicates */
178    
179  DEFUN ("eq", Feq, Seq, 2, 2, 0,  DEFUN ("eq", Feq, Seq, 2, 2, 0,
180    "Return t if the two args are the same Lisp object.")         doc: /* Return t if the two args are the same Lisp object.  */)
181    (obj1, obj2)       (obj1, obj2)
182       Lisp_Object obj1, obj2;       Lisp_Object obj1, obj2;
183  {  {
184    if (EQ (obj1, obj2))    if (EQ (obj1, obj2))
# Line 186  DEFUN ("eq", Feq, Seq, 2, 2, 0, Line 186  DEFUN ("eq", Feq, Seq, 2, 2, 0,
186    return Qnil;    return Qnil;
187  }  }
188    
189  DEFUN ("null", Fnull, Snull, 1, 1, 0, "Return t if OBJECT is nil.")  DEFUN ("null", Fnull, Snull, 1, 1, 0,
190    (object)         doc: /* Return t if OBJECT is nil.  */)
191         (object)
192       Lisp_Object object;       Lisp_Object object;
193  {  {
194    if (NILP (object))    if (NILP (object))
# Line 196  DEFUN ("null", Fnull, Snull, 1, 1, 0, "R Line 197  DEFUN ("null", Fnull, Snull, 1, 1, 0, "R
197  }  }
198    
199  DEFUN ("type-of", Ftype_of, Stype_of, 1, 1, 0,  DEFUN ("type-of", Ftype_of, Stype_of, 1, 1, 0,
200    "Return a symbol representing the type of OBJECT.\n\         doc: /* Return a symbol representing the type of OBJECT.
201  The symbol returned names the object's basic type;\n\  The symbol returned names the object's basic type;
202  for example, (type-of 1) returns `integer'.")  for example, (type-of 1) returns `integer'.  */)
203    (object)       (object)
204       Lisp_Object object;       Lisp_Object object;
205  {  {
206    switch (XGCTYPE (object))    switch (XGCTYPE (object))
# Line 259  for example, (type-of 1) returns `intege Line 260  for example, (type-of 1) returns `intege
260      }      }
261  }  }
262    
263  DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0, "Return t if OBJECT is a cons cell.")  DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0,
264    (object)         doc: /* Return t if OBJECT is a cons cell.  */)
265         (object)
266       Lisp_Object object;       Lisp_Object object;
267  {  {
268    if (CONSP (object))    if (CONSP (object))
# Line 269  DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0, Line 271  DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0,
271  }  }
272    
273  DEFUN ("atom", Fatom, Satom, 1, 1, 0,  DEFUN ("atom", Fatom, Satom, 1, 1, 0,
274         "Return t if OBJECT is not a cons cell.  This includes nil.")         doc: /* Return t if OBJECT is not a cons cell.  This includes nil.  */)
275    (object)       (object)
276       Lisp_Object object;       Lisp_Object object;
277  {  {
278    if (CONSP (object))    if (CONSP (object))
# Line 279  DEFUN ("atom", Fatom, Satom, 1, 1, 0, Line 281  DEFUN ("atom", Fatom, Satom, 1, 1, 0,
281  }  }
282    
283  DEFUN ("listp", Flistp, Slistp, 1, 1, 0,  DEFUN ("listp", Flistp, Slistp, 1, 1, 0,
284         "Return t if OBJECT is a list.  This includes nil.")         doc: /* Return t if OBJECT is a list.  This includes nil.  */)
285    (object)       (object)
286       Lisp_Object object;       Lisp_Object object;
287  {  {
288    if (CONSP (object) || NILP (object))    if (CONSP (object) || NILP (object))
# Line 289  DEFUN ("listp", Flistp, Slistp, 1, 1, 0, Line 291  DEFUN ("listp", Flistp, Slistp, 1, 1, 0,
291  }  }
292    
293  DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, 0,  DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, 0,
294         "Return t if OBJECT is not a list.  Lists include nil.")         doc: /* Return t if OBJECT is not a list.  Lists include nil.  */)
295    (object)       (object)
296       Lisp_Object object;       Lisp_Object object;
297  {  {
298    if (CONSP (object) || NILP (object))    if (CONSP (object) || NILP (object))
# Line 299  DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, Line 301  DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1,
301  }  }
302    
303  DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1, 1, 0,  DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1, 1, 0,
304         "Return t if OBJECT is a symbol.")         doc: /* Return t if OBJECT is a symbol.  */)
305    (object)       (object)
306       Lisp_Object object;       Lisp_Object object;
307  {  {
308    if (SYMBOLP (object))    if (SYMBOLP (object))
# Line 311  DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1, Line 313  DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1,
313  /* Define this in C to avoid unnecessarily consing up the symbol  /* Define this in C to avoid unnecessarily consing up the symbol
314     name.  */     name.  */
315  DEFUN ("keywordp", Fkeywordp, Skeywordp, 1, 1, 0,  DEFUN ("keywordp", Fkeywordp, Skeywordp, 1, 1, 0,
316         "Return t if OBJECT is a keyword.\n\         doc: /* Return t if OBJECT is a keyword.
317  This means that it is a symbol with a print name beginning with `:'\n\  This means that it is a symbol with a print name beginning with `:'
318  interned in the initial obarray.")  interned in the initial obarray.  */)
319    (object)       (object)
320       Lisp_Object object;       Lisp_Object object;
321  {  {
322    if (SYMBOLP (object)    if (SYMBOLP (object)
# Line 325  interned in the initial obarray.") Line 327  interned in the initial obarray.")
327  }  }
328    
329  DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0,  DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0,
330         "Return t if OBJECT is a vector.")         doc: /* Return t if OBJECT is a vector.  */)
331    (object)       (object)
332       Lisp_Object object;       Lisp_Object object;
333  {  {
334    if (VECTORP (object))    if (VECTORP (object))
# Line 335  DEFUN ("vectorp", Fvectorp, Svectorp, 1, Line 337  DEFUN ("vectorp", Fvectorp, Svectorp, 1,
337  }  }
338    
339  DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0,  DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0,
340         "Return t if OBJECT is a string.")         doc: /* Return t if OBJECT is a string.  */)
341    (object)       (object)
342       Lisp_Object object;       Lisp_Object object;
343  {  {
344    if (STRINGP (object))    if (STRINGP (object))
# Line 345  DEFUN ("stringp", Fstringp, Sstringp, 1, Line 347  DEFUN ("stringp", Fstringp, Sstringp, 1,
347  }  }
348    
349  DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p,  DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p,
350         1, 1, 0, "Return t if OBJECT is a multibyte string.")         1, 1, 0,
351    (object)         doc: /* Return t if OBJECT is a multibyte string.  */)
352         (object)
353       Lisp_Object object;       Lisp_Object object;
354  {  {
355    if (STRINGP (object) && STRING_MULTIBYTE (object))    if (STRINGP (object) && STRING_MULTIBYTE (object))
# Line 355  DEFUN ("multibyte-string-p", Fmultibyte_ Line 358  DEFUN ("multibyte-string-p", Fmultibyte_
358  }  }
359    
360  DEFUN ("char-table-p", Fchar_table_p, Schar_table_p, 1, 1, 0,  DEFUN ("char-table-p", Fchar_table_p, Schar_table_p, 1, 1, 0,
361         "Return t if OBJECT is a char-table.")         doc: /* Return t if OBJECT is a char-table.  */)
362    (object)       (object)
363       Lisp_Object object;       Lisp_Object object;
364  {  {
365    if (CHAR_TABLE_P (object))    if (CHAR_TABLE_P (object))
# Line 366  DEFUN ("char-table-p", Fchar_table_p, Sc Line 369  DEFUN ("char-table-p", Fchar_table_p, Sc
369    
370  DEFUN ("vector-or-char-table-p", Fvector_or_char_table_p,  DEFUN ("vector-or-char-table-p", Fvector_or_char_table_p,
371         Svector_or_char_table_p, 1, 1, 0,         Svector_or_char_table_p, 1, 1, 0,
372         "Return t if OBJECT is a char-table or vector.")         doc: /* Return t if OBJECT is a char-table or vector.  */)
373    (object)       (object)
374       Lisp_Object object;       Lisp_Object object;
375  {  {
376    if (VECTORP (object) || CHAR_TABLE_P (object))    if (VECTORP (object) || CHAR_TABLE_P (object))
# Line 375  DEFUN ("vector-or-char-table-p", Fvector Line 378  DEFUN ("vector-or-char-table-p", Fvector
378    return Qnil;    return Qnil;
379  }  }
380    
381  DEFUN ("bool-vector-p", Fbool_vector_p, Sbool_vector_p, 1, 1, 0, "Return t if OBJECT is a bool-vector.")  DEFUN ("bool-vector-p", Fbool_vector_p, Sbool_vector_p, 1, 1, 0,
382    (object)         doc: /* Return t if OBJECT is a bool-vector.  */)
383         (object)
384       Lisp_Object object;       Lisp_Object object;
385  {  {
386    if (BOOL_VECTOR_P (object))    if (BOOL_VECTOR_P (object))
# Line 384  DEFUN ("bool-vector-p", Fbool_vector_p, Line 388  DEFUN ("bool-vector-p", Fbool_vector_p,
388    return Qnil;    return Qnil;
389  }  }
390    
391  DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, 0, "Return t if OBJECT is an array (string or vector).")  DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, 0,
392    (object)         doc: /* Return t if OBJECT is an array (string or vector).  */)
393         (object)
394       Lisp_Object object;       Lisp_Object object;
395  {  {
396    if (VECTORP (object) || STRINGP (object)    if (VECTORP (object) || STRINGP (object)
# Line 395  DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, Line 400  DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1,
400  }  }
401    
402  DEFUN ("sequencep", Fsequencep, Ssequencep, 1, 1, 0,  DEFUN ("sequencep", Fsequencep, Ssequencep, 1, 1, 0,
403    "Return t if OBJECT is a sequence (list or array).")         doc: /* Return t if OBJECT is a sequence (list or array).  */)
404    (object)       (object)
405       register Lisp_Object object;       register Lisp_Object object;
406  {  {
407    if (CONSP (object) || NILP (object) || VECTORP (object) || STRINGP (object)    if (CONSP (object) || NILP (object) || VECTORP (object) || STRINGP (object)
# Line 405  DEFUN ("sequencep", Fsequencep, Ssequenc Line 410  DEFUN ("sequencep", Fsequencep, Ssequenc
410    return Qnil;    return Qnil;
411  }  }
412    
413  DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0, "Return t if OBJECT is an editor buffer.")  DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0,
414    (object)         doc: /* Return t if OBJECT is an editor buffer.  */)
415         (object)
416       Lisp_Object object;       Lisp_Object object;
417  {  {
418    if (BUFFERP (object))    if (BUFFERP (object))
# Line 414  DEFUN ("bufferp", Fbufferp, Sbufferp, 1, Line 420  DEFUN ("bufferp", Fbufferp, Sbufferp, 1,
420    return Qnil;    return Qnil;
421  }  }
422    
423  DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0, "Return t if OBJECT is a marker (editor pointer).")  DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0,
424    (object)         doc: /* Return t if OBJECT is a marker (editor pointer).  */)
425         (object)
426       Lisp_Object object;       Lisp_Object object;
427  {  {
428    if (MARKERP (object))    if (MARKERP (object))
# Line 423  DEFUN ("markerp", Fmarkerp, Smarkerp, 1, Line 430  DEFUN ("markerp", Fmarkerp, Smarkerp, 1,
430    return Qnil;    return Qnil;
431  }  }
432    
433  DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, "Return t if OBJECT is a built-in function.")  DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0,
434    (object)         doc: /* Return t if OBJECT is a built-in function.  */)
435         (object)
436       Lisp_Object object;       Lisp_Object object;
437  {  {
438    if (SUBRP (object))    if (SUBRP (object))
# Line 433  DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, Line 441  DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0,
441  }  }
442    
443  DEFUN ("byte-code-function-p", Fbyte_code_function_p, Sbyte_code_function_p,  DEFUN ("byte-code-function-p", Fbyte_code_function_p, Sbyte_code_function_p,
444         1, 1, 0, "Return t if OBJECT is a byte-compiled function object.")         1, 1, 0,
445    (object)         doc: /* Return t if OBJECT is a byte-compiled function object.  */)
446         (object)
447       Lisp_Object object;       Lisp_Object object;
448  {  {
449    if (COMPILEDP (object))    if (COMPILEDP (object))
# Line 443  DEFUN ("byte-code-function-p", Fbyte_cod Line 452  DEFUN ("byte-code-function-p", Fbyte_cod
452  }  }
453    
454  DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0,  DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0,
455    "Return t if OBJECT is a character (an integer) or a string.")         doc: /* Return t if OBJECT is a character (an integer) or a string.  */)
456    (object)       (object)
457       register Lisp_Object object;       register Lisp_Object object;
458  {  {
459    if (INTEGERP (object) || STRINGP (object))    if (INTEGERP (object) || STRINGP (object))
# Line 452  DEFUN ("char-or-string-p", Fchar_or_stri Line 461  DEFUN ("char-or-string-p", Fchar_or_stri
461    return Qnil;    return Qnil;
462  }  }
463    
464  DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, "Return t if OBJECT is an integer.")  DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0,
465    (object)         doc: /* Return t if OBJECT is an integer.  */)
466         (object)
467       Lisp_Object object;       Lisp_Object object;
468  {  {
469    if (INTEGERP (object))    if (INTEGERP (object))
# Line 462  DEFUN ("integerp", Fintegerp, Sintegerp, Line 472  DEFUN ("integerp", Fintegerp, Sintegerp,
472  }  }
473    
474  DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, 0,  DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, 0,
475    "Return t if OBJECT is an integer or a marker (editor pointer).")         doc: /* Return t if OBJECT is an integer or a marker (editor pointer).  */)
476    (object)       (object)
477       register Lisp_Object object;       register Lisp_Object object;
478  {  {
479    if (MARKERP (object) || INTEGERP (object))    if (MARKERP (object) || INTEGERP (object))
# Line 472  DEFUN ("integer-or-marker-p", Finteger_o Line 482  DEFUN ("integer-or-marker-p", Finteger_o
482  }  }
483    
484  DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0,  DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0,
485    "Return t if OBJECT is a nonnegative integer.")         doc: /* Return t if OBJECT is a nonnegative integer.  */)
486    (object)       (object)
487       Lisp_Object object;       Lisp_Object object;
488  {  {
489    if (NATNUMP (object))    if (NATNUMP (object))
# Line 482  DEFUN ("natnump", Fnatnump, Snatnump, 1, Line 492  DEFUN ("natnump", Fnatnump, Snatnump, 1,
492  }  }
493    
494  DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0,  DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0,
495         "Return t if OBJECT is a number (floating point or integer).")         doc: /* Return t if OBJECT is a number (floating point or integer).  */)
496    (object)       (object)
497       Lisp_Object object;       Lisp_Object object;
498  {  {
499    if (NUMBERP (object))    if (NUMBERP (object))
# Line 494  DEFUN ("numberp", Fnumberp, Snumberp, 1, Line 504  DEFUN ("numberp", Fnumberp, Snumberp, 1,
504    
505  DEFUN ("number-or-marker-p", Fnumber_or_marker_p,  DEFUN ("number-or-marker-p", Fnumber_or_marker_p,
506         Snumber_or_marker_p, 1, 1, 0,         Snumber_or_marker_p, 1, 1, 0,
507         "Return t if OBJECT is a number or a marker.")         doc: /* Return t if OBJECT is a number or a marker.  */)
508    (object)       (object)
509       Lisp_Object object;       Lisp_Object object;
510  {  {
511    if (NUMBERP (object) || MARKERP (object))    if (NUMBERP (object) || MARKERP (object))
# Line 504  DEFUN ("number-or-marker-p", Fnumber_or_ Line 514  DEFUN ("number-or-marker-p", Fnumber_or_
514  }  }
515    
516  DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0,  DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0,
517         "Return t if OBJECT is a floating point number.")         doc: /* Return t if OBJECT is a floating point number.  */)
518    (object)       (object)
519       Lisp_Object object;       Lisp_Object object;
520  {  {
521    if (FLOATP (object))    if (FLOATP (object))
# Line 517  DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, Line 527  DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1,
527  /* Extract and set components of lists */  /* Extract and set components of lists */
528    
529  DEFUN ("car", Fcar, Scar, 1, 1, 0,  DEFUN ("car", Fcar, Scar, 1, 1, 0,
530    "Return the car of LIST.  If arg is nil, return nil.\n\         doc: /* Return the car of LIST.  If arg is nil, return nil.
531  Error if arg is not nil and not a cons cell.  See also `car-safe'.")  Error if arg is not nil and not a cons cell.  See also `car-safe'.  */)
532    (list)       (list)
533       register Lisp_Object list;       register Lisp_Object list;
534  {  {
535    while (1)    while (1)
# Line 534  Error if arg is not nil and not a cons c Line 544  Error if arg is not nil and not a cons c
544  }  }
545    
546  DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0,  DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0,
547    "Return the car of OBJECT if it is a cons cell, or else nil.")         doc: /* Return the car of OBJECT if it is a cons cell, or else nil.  */)
548    (object)       (object)
549       Lisp_Object object;       Lisp_Object object;
550  {  {
551    if (CONSP (object))    if (CONSP (object))
# Line 545  DEFUN ("car-safe", Fcar_safe, Scar_safe, Line 555  DEFUN ("car-safe", Fcar_safe, Scar_safe,
555  }  }
556    
557  DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0,  DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0,
558    "Return the cdr of LIST.  If arg is nil, return nil.\n\         doc: /* Return the cdr of LIST.  If arg is nil, return nil.
559  Error if arg is not nil and not a cons cell.  See also `cdr-safe'.")  Error if arg is not nil and not a cons cell.  See also `cdr-safe'.  */)
560         (list)
   (list)  
561       register Lisp_Object list;       register Lisp_Object list;
562  {  {
563    while (1)    while (1)
# Line 563  Error if arg is not nil and not a cons c Line 572  Error if arg is not nil and not a cons c
572  }  }
573    
574  DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0,  DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0,
575    "Return the cdr of OBJECT if it is a cons cell, or else nil.")         doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil.  */)
576    (object)       (object)
577       Lisp_Object object;       Lisp_Object object;
578  {  {
579    if (CONSP (object))    if (CONSP (object))
# Line 574  DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, Line 583  DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe,
583  }  }
584    
585  DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0,  DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0,
586    "Set the car of CELL to be NEWCAR.  Returns NEWCAR.")         doc: /* Set the car of CELL to be NEWCAR.  Returns NEWCAR.  */)
587    (cell, newcar)       (cell, newcar)
588       register Lisp_Object cell, newcar;       register Lisp_Object cell, newcar;
589  {  {
590    if (!CONSP (cell))    if (!CONSP (cell))
# Line 587  DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, Line 596  DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2,
596  }  }
597    
598  DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0,  DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0,
599    "Set the cdr of CELL to be NEWCDR.  Returns NEWCDR.")         doc: /* Set the cdr of CELL to be NEWCDR.  Returns NEWCDR.  */)
600    (cell, newcdr)       (cell, newcdr)
601       register Lisp_Object cell, newcdr;       register Lisp_Object cell, newcdr;
602  {  {
603    if (!CONSP (cell))    if (!CONSP (cell))
# Line 601  DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, Line 610  DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2,
610    
611  /* Extract and set components of symbols */  /* Extract and set components of symbols */
612    
613  DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, "Return t if SYMBOL's value is not void.")  DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0,
614    (symbol)         doc: /* Return t if SYMBOL's value is not void.  */)
615         (symbol)
616       register Lisp_Object symbol;       register Lisp_Object symbol;
617  {  {
618    Lisp_Object valcontents;    Lisp_Object valcontents;
# Line 617  DEFUN ("boundp", Fboundp, Sboundp, 1, 1, Line 627  DEFUN ("boundp", Fboundp, Sboundp, 1, 1,
627    return (EQ (valcontents, Qunbound) ? Qnil : Qt);    return (EQ (valcontents, Qunbound) ? Qnil : Qt);
628  }  }
629    
630  DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, "Return t if SYMBOL's function definition is not void.")  DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0,
631    (symbol)         doc: /* Return t if SYMBOL's function definition is not void.  */)
632         (symbol)
633       register Lisp_Object symbol;       register Lisp_Object symbol;
634  {  {
635    CHECK_SYMBOL (symbol, 0);    CHECK_SYMBOL (symbol, 0);
636    return (EQ (XSYMBOL (symbol)->function, Qunbound) ? Qnil : Qt);    return (EQ (XSYMBOL (symbol)->function, Qunbound) ? Qnil : Qt);
637  }  }
638    
639  DEFUN ("makunbound", Fmakunbound, Smakunbound, 1, 1, 0, "Make SYMBOL's value be void.")  DEFUN ("makunbound", Fmakunbound, Smakunbound, 1, 1, 0,
640    (symbol)         doc: /* Make SYMBOL's value be void.  */)
641         (symbol)
642       register Lisp_Object symbol;       register Lisp_Object symbol;
643  {  {
644    CHECK_SYMBOL (symbol, 0);    CHECK_SYMBOL (symbol, 0);
# Line 636  DEFUN ("makunbound", Fmakunbound, Smakun Line 648  DEFUN ("makunbound", Fmakunbound, Smakun
648    return symbol;    return symbol;
649  }  }
650    
651  DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0, "Make SYMBOL's function definition be void.")  DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0,
652    (symbol)         doc: /* Make SYMBOL's function definition be void.  */)
653         (symbol)
654       register Lisp_Object symbol;       register Lisp_Object symbol;
655  {  {
656    CHECK_SYMBOL (symbol, 0);    CHECK_SYMBOL (symbol, 0);
# Line 648  DEFUN ("fmakunbound", Ffmakunbound, Sfma Line 661  DEFUN ("fmakunbound", Ffmakunbound, Sfma
661  }  }
662    
663  DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0,  DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0,
664    "Return SYMBOL's function definition.  Error if that is void.")         doc: /* Return SYMBOL's function definition.  Error if that is void.  */)
665    (symbol)       (symbol)
666       register Lisp_Object symbol;       register Lisp_Object symbol;
667  {  {
668    CHECK_SYMBOL (symbol, 0);    CHECK_SYMBOL (symbol, 0);
# Line 658  DEFUN ("symbol-function", Fsymbol_functi Line 671  DEFUN ("symbol-function", Fsymbol_functi
671    return XSYMBOL (symbol)->function;    return XSYMBOL (symbol)->function;
672  }  }
673    
674  DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, "Return SYMBOL's property list.")  DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0,
675    (symbol)         doc: /* Return SYMBOL's property list.  */)
676         (symbol)
677       register Lisp_Object symbol;       register Lisp_Object symbol;
678  {  {
679    CHECK_SYMBOL (symbol, 0);    CHECK_SYMBOL (symbol, 0);
680    return XSYMBOL (symbol)->plist;    return XSYMBOL (symbol)->plist;
681  }  }
682    
683  DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, "Return SYMBOL's name, a string.")  DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0,
684    (symbol)         doc: /* Return SYMBOL's name, a string.  */)
685         (symbol)
686       register Lisp_Object symbol;       register Lisp_Object symbol;
687  {  {
688    register Lisp_Object name;    register Lisp_Object name;
# Line 678  DEFUN ("symbol-name", Fsymbol_name, Ssym Line 693  DEFUN ("symbol-name", Fsymbol_name, Ssym
693  }  }
694    
695  DEFUN ("fset", Ffset, Sfset, 2, 2, 0,  DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
696    "Set SYMBOL's function definition to DEFINITION, and return DEFINITION.")         doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION.  */)
697    (symbol, definition)       (symbol, definition)
698       register Lisp_Object symbol, definition;       register Lisp_Object symbol, definition;
699  {  {
700    CHECK_SYMBOL (symbol, 0);    CHECK_SYMBOL (symbol, 0);
# Line 699  DEFUN ("fset", Ffset, Sfset, 2, 2, 0, Line 714  DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
714  }  }
715    
716  DEFUN ("defalias", Fdefalias, Sdefalias, 2, 2, 0,  DEFUN ("defalias", Fdefalias, Sdefalias, 2, 2, 0,
717    "Set SYMBOL's function definition to DEFINITION, and return DEFINITION.\n\         doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION.
718  Associates the function with the current load file, if any.")  Associates the function with the current load file, if any.  */)
719    (symbol, definition)       (symbol, definition)
720       register Lisp_Object symbol, definition;       register Lisp_Object symbol, definition;
721  {  {
722    definition = Ffset (symbol, definition);    definition = Ffset (symbol, definition);
# Line 710  Associates the function with the current Line 725  Associates the function with the current
725  }  }
726    
727  DEFUN ("setplist", Fsetplist, Ssetplist, 2, 2, 0,  DEFUN ("setplist", Fsetplist, Ssetplist, 2, 2, 0,
728    "Set SYMBOL's property list to NEWVAL, and return NEWVAL.")         doc: /* Set SYMBOL's property list to NEWVAL, and return NEWVAL.  */)
729    (symbol, newplist)       (symbol, newplist)
730       register Lisp_Object symbol, newplist;       register Lisp_Object symbol, newplist;
731  {  {
732    CHECK_SYMBOL (symbol, 0);    CHECK_SYMBOL (symbol, 0);
# Line 720  DEFUN ("setplist", Fsetplist, Ssetplist, Line 735  DEFUN ("setplist", Fsetplist, Ssetplist,
735  }  }
736    
737  DEFUN ("subr-arity", Fsubr_arity, Ssubr_arity, 1, 1, 0,  DEFUN ("subr-arity", Fsubr_arity, Ssubr_arity, 1, 1, 0,
738    "Return minimum and maximum number of args allowed for SUBR.\n\         doc: /* Return minimum and maximum number of args allowed for SUBR.
739  SUBR must be a built-in function.\n\  SUBR must be a built-in function.
740  The returned value is a pair (MIN . MAX).  MIN is the minimum number\n\  The returned value is a pair (MIN . MAX).  MIN is the minimum number
741  of args.  MAX is the maximum number or the symbol `many', for a\n\  of args.  MAX is the maximum number or the symbol `many', for a
742  function with `&rest' args, or `unevalled' for a special form.")  function with `&rest' args, or `unevalled' for a special form.  */)
743    (subr)       (subr)
744       Lisp_Object subr;       Lisp_Object subr;
745  {  {
746    short minargs, maxargs;    short minargs, maxargs;
# Line 742  function with `&rest' args, or `unevalle Line 757  function with `&rest' args, or `unevalle
757  }  }
758    
759  DEFUN ("subr-interactive-form", Fsubr_interactive_form, Ssubr_interactive_form, 1, 1, 0,  DEFUN ("subr-interactive-form", Fsubr_interactive_form, Ssubr_interactive_form, 1, 1, 0,
760    "Return the interactive form of SUBR or nil if none.\n\         doc: /* Return the interactive form of SUBR or nil if none.
761  SUBR must be a built-in function.  Value, if non-nil, is a list\n\  SUBR must be a built-in function.  Value, if non-nil, is a list
762  \(interactive SPEC).")  \(interactive SPEC).  */)
763    (subr)       (subr)
764       Lisp_Object subr;       Lisp_Object subr;
765  {  {
766    if (!SUBRP (subr))    if (!SUBRP (subr))
# Line 790  indirect_variable (symbol) Line 805  indirect_variable (symbol)
805    
806    
807  DEFUN ("indirect-variable", Findirect_variable, Sindirect_variable, 1, 1, 0,  DEFUN ("indirect-variable", Findirect_variable, Sindirect_variable, 1, 1, 0,
808    "Return the variable at the end of OBJECT's variable chain.\n\         doc: /* Return the variable at the end of OBJECT's variable chain.
809  If OBJECT is a symbol, follow all variable indirections and return the final\n\  If OBJECT is a symbol, follow all variable indirections and return the final
810  variable.  If OBJECT is not a symbol, just return it.\n\  variable.  If OBJECT is not a symbol, just return it.
811  Signal a cyclic-variable-indirection error if there is a loop in the\n\  Signal a cyclic-variable-indirection error if there is a loop in the
812  variable chain of symbols.")  variable chain of symbols.  */)
813    (object)       (object)
814       Lisp_Object object;       Lisp_Object object;
815  {  {
816    if (SYMBOLP (object))    if (SYMBOLP (object))
# Line 1049  find_symbol_value (symbol) Line 1064  find_symbol_value (symbol)
1064  }  }
1065    
1066  DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0,  DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0,
1067    "Return SYMBOL's value.  Error if that is void.")         doc: /* Return SYMBOL's value.  Error if that is void.  */)
1068    (symbol)       (symbol)
1069       Lisp_Object symbol;       Lisp_Object symbol;
1070  {  {
1071    Lisp_Object val;    Lisp_Object val;
# Line 1063  DEFUN ("symbol-value", Fsymbol_value, Ss Line 1078  DEFUN ("symbol-value", Fsymbol_value, Ss
1078  }  }
1079    
1080  DEFUN ("set", Fset, Sset, 2, 2, 0,  DEFUN ("set", Fset, Sset, 2, 2, 0,
1081    "Set SYMBOL's value to NEWVAL, and return NEWVAL.")         doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL.  */)
1082    (symbol, newval)       (symbol, newval)
1083       register Lisp_Object symbol, newval;       register Lisp_Object symbol, newval;
1084  {  {
1085    return set_internal (symbol, newval, current_buffer, 0);    return set_internal (symbol, newval, current_buffer, 0);
# Line 1294  default_value (symbol) Line 1309  default_value (symbol)
1309  }  }
1310    
1311  DEFUN ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0,  DEFUN ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0,
1312    "Return t if SYMBOL has a non-void default value.\n\         doc: /* Return t if SYMBOL has a non-void default value.
1313  This is the value that is seen in buffers that do not have their own values\n\  This is the value that is seen in buffers that do not have their own values
1314  for this variable.")  for this variable.  */)
1315    (symbol)       (symbol)
1316       Lisp_Object symbol;       Lisp_Object symbol;
1317  {  {
1318    register Lisp_Object value;    register Lisp_Object value;
# Line 1307  for this variable.") Line 1322  for this variable.")
1322  }  }
1323    
1324  DEFUN ("default-value", Fdefault_value, Sdefault_value, 1, 1, 0,  DEFUN ("default-value", Fdefault_value, Sdefault_value, 1, 1, 0,
1325    "Return SYMBOL's default value.\n\         doc: /* Return SYMBOL's default value.
1326  This is the value that is seen in buffers that do not have their own values\n\  This is the value that is seen in buffers that do not have their own values
1327  for this variable.  The default value is meaningful for variables with\n\  for this variable.  The default value is meaningful for variables with
1328  local bindings in certain buffers.")  local bindings in certain buffers.  */)
1329    (symbol)       (symbol)
1330       Lisp_Object symbol;       Lisp_Object symbol;
1331  {  {
1332    register Lisp_Object value;    register Lisp_Object value;
# Line 1323  local bindings in certain buffers.") Line 1338  local bindings in certain buffers.")
1338  }  }
1339    
1340  DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0,  DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0,
1341    "Set SYMBOL's default value to VAL.  SYMBOL and VAL are evaluated.\n\         doc: /* Set SYMBOL's default value to VAL.  SYMBOL and VAL are evaluated.
1342  The default value is seen in buffers that do not have their own values\n\  The default value is seen in buffers that do not have their own values
1343  for this variable.")  for this variable.  */)
1344    (symbol, value)       (symbol, value)
1345       Lisp_Object symbol, value;       Lisp_Object symbol, value;
1346  {  {
1347    register Lisp_Object valcontents, current_alist_element, alist_element_buffer;    register Lisp_Object valcontents, current_alist_element, alist_element_buffer;
# Line 1377  for this variable.") Line 1392  for this variable.")
1392  }  }
1393    
1394  DEFUN ("setq-default", Fsetq_default, Ssetq_default, 2, UNEVALLED, 0,  DEFUN ("setq-default", Fsetq_default, Ssetq_default, 2, UNEVALLED, 0,
1395         "Set the default value of variable VAR to VALUE.\n\         doc: /* Set the default value of variable VAR to VALUE.
1396  VAR, the variable name, is literal (not evaluated);\n\  VAR, the variable name, is literal (not evaluated);
1397  VALUE is an expression and it is evaluated.\n\  VALUE is an expression and it is evaluated.
1398  The default value of a variable is seen in buffers\n\  The default value of a variable is seen in buffers
1399  that do not have their own values for the variable.\n\  that do not have their own values for the variable.
1400  \n\  
1401  More generally, you can use multiple variables and values, as in\n\  More generally, you can use multiple variables and values, as in
1402    (setq-default SYMBOL VALUE SYMBOL VALUE...)\n\    (setq-default SYMBOL VALUE SYMBOL VALUE...)
1403  This sets each SYMBOL's default value to the corresponding VALUE.\n\  This sets each SYMBOL's default value to the corresponding VALUE.
1404  The VALUE for the Nth SYMBOL can refer to the new default values\n\  The VALUE for the Nth SYMBOL can refer to the new default values
1405  of previous SYMs.")  of previous SYMs.  */)
1406    (args)       (args)
1407       Lisp_Object args;       Lisp_Object args;
1408  {  {
1409    register Lisp_Object args_left;    register Lisp_Object args_left;
# Line 1417  of previous SYMs.") Line 1432  of previous SYMs.")
1432  /* Lisp functions for creating and removing buffer-local variables.  */  /* Lisp functions for creating and removing buffer-local variables.  */
1433    
1434  DEFUN ("make-variable-buffer-local", Fmake_variable_buffer_local, Smake_variable_buffer_local,  DEFUN ("make-variable-buffer-local", Fmake_variable_buffer_local, Smake_variable_buffer_local,
1435    1, 1, "vMake Variable Buffer Local: ",         1, 1, "vMake Variable Buffer Local: ",
1436    "Make VARIABLE become buffer-local whenever it is set.\n\         doc: /* Make VARIABLE become buffer-local whenever it is set.
1437  At any time, the value for the current buffer is in effect,\n\  At any time, the value for the current buffer is in effect,
1438  unless the variable has never been set in this buffer,\n\  unless the variable has never been set in this buffer,
1439  in which case the default value is in effect.\n\  in which case the default value is in effect.
1440  Note that binding the variable with `let', or setting it while\n\  Note that binding the variable with `let', or setting it while
1441  a `let'-style binding made in this buffer is in effect,\n\  a `let'-style binding made in this buffer is in effect,
1442  does not make the variable buffer-local.\n\  does not make the variable buffer-local.
1443  \n\  
1444  The function `default-value' gets the default value and `set-default' sets it.")  The function `default-value' gets the default value and `set-default' sets it.  */)
1445    (variable)       (variable)
1446       register Lisp_Object variable;       register Lisp_Object variable;
1447  {  {
1448    register Lisp_Object tem, valcontents, newval;    register Lisp_Object tem, valcontents, newval;
# Line 1463  The function `default-value' gets the de Line 1478  The function `default-value' gets the de
1478  }  }
1479    
1480  DEFUN ("make-local-variable", Fmake_local_variable, Smake_local_variable,  DEFUN ("make-local-variable", Fmake_local_variable, Smake_local_variable,
1481    1, 1, "vMake Local Variable: ",         1, 1, "vMake Local Variable: ",
1482    "Make VARIABLE have a separate value in the current buffer.\n\         doc: /* Make VARIABLE have a separate value in the current buffer.
1483  Other buffers will continue to share a common default value.\n\  Other buffers will continue to share a common default value.
1484  \(The buffer-local value of VARIABLE starts out as the same value\n\  \(The buffer-local value of VARIABLE starts out as the same value
1485  VARIABLE previously had.  If VARIABLE was void, it remains void.\)\n\  VARIABLE previously had.  If VARIABLE was void, it remains void.\)
1486  See also `make-variable-buffer-local'.\n\  See also `make-variable-buffer-local'.
1487  \n\  
1488  If the variable is already arranged to become local when set,\n\  If the variable is already arranged to become local when set,
1489  this function causes a local value to exist for this buffer,\n\  this function causes a local value to exist for this buffer,
1490  just as setting the variable would do.\n\  just as setting the variable would do.
1491  \n\  
1492  This function returns VARIABLE, and therefore\n\  This function returns VARIABLE, and therefore
1493    (set (make-local-variable 'VARIABLE) VALUE-EXP)\n\    (set (make-local-variable 'VARIABLE) VALUE-EXP)
1494  works.\n\  works.
1495  \n\  
1496  Do not use `make-local-variable' to make a hook variable buffer-local.\n\  Do not use `make-local-variable' to make a hook variable buffer-local.
1497  Use `make-local-hook' instead.")  Use `make-local-hook' instead.  */)
1498    (variable)       (variable)
1499       register Lisp_Object variable;       register Lisp_Object variable;
1500  {  {
1501    register Lisp_Object tem, valcontents;    register Lisp_Object tem, valcontents;
# Line 1556  Use `make-local-hook' instead.") Line 1571  Use `make-local-hook' instead.")
1571  }  }
1572    
1573  DEFUN ("kill-local-variable", Fkill_local_variable, Skill_local_variable,  DEFUN ("kill-local-variable", Fkill_local_variable, Skill_local_variable,
1574    1, 1, "vKill Local Variable: ",         1, 1, "vKill Local Variable: ",
1575    "Make VARIABLE no longer have a separate value in the current buffer.\n\         doc: /* Make VARIABLE no longer have a separate value in the current buffer.
1576  From now on the default value will apply in this buffer.")  From now on the default value will apply in this buffer.  */)
1577    (variable)       (variable)
1578       register Lisp_Object variable;       register Lisp_Object variable;
1579  {  {
1580    register Lisp_Object tem, valcontents;    register Lisp_Object tem, valcontents;
# Line 1614  From now on the default value will apply Line 1629  From now on the default value will apply
1629  /* Lisp functions for creating and removing buffer-local variables.  */  /* Lisp functions for creating and removing buffer-local variables.  */
1630    
1631  DEFUN ("make-variable-frame-local", Fmake_variable_frame_local, Smake_variable_frame_local,  DEFUN ("make-variable-frame-local", Fmake_variable_frame_local, Smake_variable_frame_local,
1632    1, 1, "vMake Variable Frame Local: ",         1, 1, "vMake Variable Frame Local: ",
1633    "Enable VARIABLE to have frame-local bindings.\n\         doc: /* Enable VARIABLE to have frame-local bindings.
1634  When a frame-local binding exists in the current frame,\n\  When a frame-local binding exists in the current frame,
1635  it is in effect whenever the current buffer has no buffer-local binding.\n\  it is in effect whenever the current buffer has no buffer-local binding.
1636  A frame-local binding is actual a frame parameter value;\n\  A frame-local binding is actual a frame parameter value;
1637  thus, any given frame has a local binding for VARIABLE\n\  thus, any given frame has a local binding for VARIABLE
1638  if it has a value for the frame parameter named VARIABLE.\n\  if it has a value for the frame parameter named VARIABLE.
1639  See `modify-frame-parameters'.")  See `modify-frame-parameters'.  */)
1640    (variable)       (variable)
1641       register Lisp_Object variable;       register Lisp_Object variable;
1642  {  {
1643    register Lisp_Object tem, valcontents, newval;    register Lisp_Object tem, valcontents, newval;
# Line 1659  See `modify-frame-parameters'.") Line 1674  See `modify-frame-parameters'.")
1674  }  }
1675    
1676  DEFUN ("local-variable-p", Flocal_variable_p, Slocal_variable_p,  DEFUN ("local-variable-p", Flocal_variable_p, Slocal_variable_p,
1677    1, 2, 0,         1, 2, 0,
1678    "Non-nil if VARIABLE has a local binding in buffer BUFFER.\n\         doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER.
1679  BUFFER defaults to the current buffer.")  BUFFER defaults to the current buffer.  */)
1680    (variable, buffer)       (variable, buffer)
1681       register Lisp_Object variable, buffer;       register Lisp_Object variable, buffer;
1682  {  {
1683    Lisp_Object valcontents;    Lisp_Object valcontents;
# Line 1703  BUFFER defaults to the current buffer.") Line 1718  BUFFER defaults to the current buffer.")
1718  }  }
1719    
1720  DEFUN ("local-variable-if-set-p", Flocal_variable_if_set_p, Slocal_variable_if_set_p,  DEFUN ("local-variable-if-set-p", Flocal_variable_if_set_p, Slocal_variable_if_set_p,
1721    1, 2, 0,         1, 2, 0,
1722    "Non-nil if VARIABLE will be local in buffer BUFFER if it is set there.\n\         doc: /* Non-nil if VARIABLE will be local in buffer BUFFER if it is set there.
1723  BUFFER defaults to the current buffer.")  BUFFER defaults to the current buffer.  */)
1724    (variable, buffer)       (variable, buffer)
1725       register Lisp_Object variable, buffer;       register Lisp_Object variable, buffer;
1726  {  {
1727    Lisp_Object valcontents;    Lisp_Object valcontents;
# Line 1779  indirect_function (object) Line 1794  indirect_function (object)
1794  }  }
1795    
1796  DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 1, 0,  DEFUN ("indirect-function", Findirect_function, Sindirect_function, 1, 1, 0,
1797    "Return the function at the end of OBJECT's function chain.\n\         doc: /* Return the function at the end of OBJECT's function chain.
1798  If OBJECT is a symbol, follow all function indirections and return the final\n\  If OBJECT is a symbol, follow all function indirections and return the final
1799  function binding.\n\  function binding.
1800  If OBJECT is not a symbol, just return it.\n\  If OBJECT is not a symbol, just return it.
1801  Signal a void-function error if the final symbol is unbound.\n\  Signal a void-function error if the final symbol is unbound.
1802  Signal a cyclic-function-indirection error if there is a loop in the\n\  Signal a cyclic-function-indirection error if there is a loop in the
1803  function chain of symbols.")  function chain of symbols.  */)
1804    (object)       (object)
1805      register Lisp_Object object;       register Lisp_Object object;
1806  {  {
1807    Lisp_Object result;    Lisp_Object result;
1808    
# Line 1801  function chain of symbols.") Line 1816  function chain of symbols.")
1816  /* Extract and set vector and string elements */  /* Extract and set vector and string elements */
1817    
1818  DEFUN ("aref", Faref, Saref, 2, 2, 0,  DEFUN ("aref", Faref, Saref, 2, 2, 0,
1819    "Return the element of ARRAY at index IDX.\n\         doc: /* Return the element of ARRAY at index IDX.
1820  ARRAY may be a vector, a string, a char-table, a bool-vector,\n\  ARRAY may be a vector, a string, a char-table, a bool-vector,
1821  or a byte-code object.  IDX starts at 0.")  or a byte-code object.  IDX starts at 0.  */)
1822    (array, idx)       (array, idx)
1823       register Lisp_Object array;       register Lisp_Object array;
1824       Lisp_Object idx;       Lisp_Object idx;
1825  {  {
# Line 1932  or a byte-code object.  IDX starts at 0. Line 1947  or a byte-code object.  IDX starts at 0.
1947  #define MAX_ALLOCA 16*1024  #define MAX_ALLOCA 16*1024
1948    
1949  DEFUN ("aset", Faset, Saset, 3, 3, 0,  DEFUN ("aset", Faset, Saset, 3, 3, 0,
1950    "Store into the element of ARRAY at index IDX the value NEWELT.\n\         doc: /* Store into the element of ARRAY at index IDX the value NEWELT.
1951  ARRAY may be a vector, a string, a char-table or a bool-vector.\n\  ARRAY may be a vector, a string, a char-table or a bool-vector.
1952  IDX starts at 0.")  IDX starts at 0.  */)
1953    (array, idx, newelt)       (array, idx, newelt)
1954       register Lisp_Object array;       register Lisp_Object array;
1955       Lisp_Object idx, newelt;       Lisp_Object idx, newelt;
1956  {  {
# Line 2152  arithcompare (num1, num2, comparison) Line 2167  arithcompare (num1, num2, comparison)
2167  }  }
2168    
2169  DEFUN ("=", Feqlsign, Seqlsign, 2, 2, 0,  DEFUN ("=", Feqlsign, Seqlsign, 2, 2, 0,
2170    "Return t if two args, both numbers or markers, are equal.")         doc: /* Return t if two args, both numbers or markers, are equal.  */)
2171    (num1, num2)       (num1, num2)
2172       register Lisp_Object num1, num2;       register Lisp_Object num1, num2;
2173  {  {
2174    return arithcompare (num1, num2, equal);    return arithcompare (num1, num2, equal);
2175  }  }
2176    
2177  DEFUN ("<", Flss, Slss, 2, 2, 0,  DEFUN ("<", Flss, Slss, 2, 2, 0,
2178    "Return t if first arg is less than second arg.  Both must be numbers or markers.")         doc: /* Return t if first arg is less than second arg.  Both must be numbers or markers.  */)
2179    (num1, num2)       (num1, num2)
2180       register Lisp_Object num1, num2;       register Lisp_Object num1, num2;
2181  {  {
2182    return arithcompare (num1, num2, less);    return arithcompare (num1, num2, less);
2183  }  }
2184    
2185  DEFUN (">", Fgtr, Sgtr, 2, 2, 0,  DEFUN (">", Fgtr, Sgtr, 2, 2, 0,
2186    "Return t if first arg is greater than second arg.  Both must be numbers or markers.")         doc: /* Return t if first arg is greater than second arg.  Both must be numbers or markers.  */)
2187    (num1, num2)       (num1, num2)
2188       register Lisp_Object num1, num2;       register Lisp_Object num1, num2;
2189  {  {
2190    return arithcompare (num1, num2, grtr);    return arithcompare (num1, num2, grtr);
2191  }  }
2192    
2193  DEFUN ("<=", Fleq, Sleq, 2, 2, 0,  DEFUN ("<=", Fleq, Sleq, 2, 2, 0,
2194    "Return t if first arg is less than or equal to second arg.\n\         doc: /* Return t if first arg is less than or equal to second arg.
2195  Both must be numbers or markers.")  Both must be numbers or markers.  */)
2196    (num1, num2)       (num1, num2)
2197       register Lisp_Object num1, num2;       register Lisp_Object num1, num2;
2198  {  {
2199    return arithcompare (num1, num2, less_or_equal);    return arithcompare (num1, num2, less_or_equal);
2200  }  }
2201    
2202  DEFUN (">=", Fgeq, Sgeq, 2, 2, 0,  DEFUN (">=", Fgeq, Sgeq, 2, 2, 0,
2203    "Return t if first arg is greater than or equal to second arg.\n\         doc: /* Return t if first arg is greater than or equal to second arg.
2204  Both must be numbers or markers.")  Both must be numbers or markers.  */)
2205    (num1, num2)       (num1, num2)
2206       register Lisp_Object num1, num2;       register Lisp_Object num1, num2;
2207  {  {
2208    return arithcompare (num1, num2, grtr_or_equal);    return arithcompare (num1, num2, grtr_or_equal);
2209  }  }
2210    
2211  DEFUN ("/=", Fneq, Sneq, 2, 2, 0,  DEFUN ("/=", Fneq, Sneq, 2, 2, 0,
2212    "Return t if first arg is not equal to second arg.  Both must be numbers or markers.")         doc: /* Return t if first arg is not equal to second arg.  Both must be numbers or markers.  */)
2213    (num1, num2)       (num1, num2)
2214       register Lisp_Object num1, num2;       register Lisp_Object num1, num2;
2215  {  {
2216    return arithcompare (num1, num2, notequal);    return arithcompare (num1, num2, notequal);
2217  }  }
2218    
2219  DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, "Return t if NUMBER is zero.")  DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0,
2220    (number)         doc: /* Return t if NUMBER is zero.  */)
2221         (number)
2222       register Lisp_Object number;       register Lisp_Object number;
2223  {  {
2224    CHECK_NUMBER_OR_FLOAT (number, 0);    CHECK_NUMBER_OR_FLOAT (number, 0);
# Line 2249  cons_to_long (c) Line 2265  cons_to_long (c)
2265  }  }
2266    
2267  DEFUN ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0,  DEFUN ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0,
2268    "Convert NUMBER to a string by printing it in decimal.\n\         doc: /* Convert NUMBER to a string by printing it in decimal.
2269  Uses a minus sign if negative.\n\  Uses a minus sign if negative.
2270  NUMBER may be an integer or a floating point number.")  NUMBER may be an integer or a floating point number.  */)
2271    (number)       (number)
2272       Lisp_Object number;       Lisp_Object number;
2273  {  {
2274    char buffer[VALBITS];    char buffer[VALBITS];
# Line 2298  digit_to_number (character, base) Line 2314  digit_to_number (character, base)
2314  }      }    
2315    
2316  DEFUN ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0,  DEFUN ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0,
2317    "Convert STRING to a number by parsing it as a decimal number.\n\         doc: /* Convert STRING to a number by parsing it as a decimal number.
2318  This parses both integers and floating point numbers.\n\  This parses both integers and floating point numbers.
2319  It ignores leading spaces and tabs.\n\  It ignores leading spaces and tabs.
2320  \n\  
2321  If BASE, interpret STRING as a number in that base.  If BASE isn't\n\  If BASE, interpret STRING as a number in that base.  If BASE isn't
2322  present, base 10 is used.  BASE must be between 2 and 16 (inclusive).\n\  present, base 10 is used.  BASE must be between 2 and 16 (inclusive).
2323  If the base used is not 10, floating point is not recognized.")  If the base used is not 10, floating point is not recognized.  */)
2324     (string, base)       (string, base)
2325       register Lisp_Object string, base;       register Lisp_Object string, base;
2326  {  {
2327    register unsigned char *p;    register unsigned char *p;
# Line 2531  float_arith_driver (accum, argnum, code, Line 2547  float_arith_driver (accum, argnum, code,
2547    
2548    
2549  DEFUN ("+", Fplus, Splus, 0, MANY, 0,  DEFUN ("+", Fplus, Splus, 0, MANY, 0,
2550    "Return sum of any number of arguments, which are numbers or markers.         doc: /* Return sum of any number of arguments, which are numbers or markers.
2551  usage: (+ &rest NUMBERS-OR-MARKERS)")  usage: (+ &rest NUMBERS-OR-MARKERS)  */)
2552    (nargs, args)       (nargs, args)
2553       int nargs;       int nargs;
2554       Lisp_Object *args;       Lisp_Object *args;
2555  {  {
# Line 2541  usage: (+ &rest NUMBERS-OR-MARKERS)") Line 2557  usage: (+ &rest NUMBERS-OR-MARKERS)")
2557  }  }
2558    
2559  DEFUN ("-", Fminus, Sminus, 0, MANY, 0,  DEFUN ("-", Fminus, Sminus, 0, MANY, 0,
2560    "Negate number or subtract numbers or markers.\n\         doc: /* Negate number or subtract numbers or markers.
2561  With one arg, negates it.  With more than one arg,\n\  With one arg, negates it.  With more than one arg,
2562  subtracts all but the first from the first.  subtracts all but the first from the first.
2563  usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS)")  usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS)  */)
2564    (nargs, args)       (nargs, args)
2565       int nargs;       int nargs;
2566       Lisp_Object *args;       Lisp_Object *args;
2567  {  {
# Line 2553  usage: (- &optional NUMBER-OR-MARKER &re Line 2569  usage: (- &optional NUMBER-OR-MARKER &re
2569  }  }
2570    
2571  DEFUN ("*", Ftimes, Stimes, 0, MANY, 0,  DEFUN ("*", Ftimes, Stimes, 0, MANY, 0,
2572    "Returns product of any number of arguments, which are numbers or markers.         doc: /* Returns product of any number of arguments, which are numbers or markers.
2573  usage: (* &rest NUMBERS-OR-MARKERS)")  usage: (* &rest NUMBERS-OR-MARKERS)  */)
2574    (nargs, args)       (nargs, args)
2575       int nargs;       int nargs;
2576       Lisp_Object *args;       Lisp_Object *args;
2577  {  {
# Line 2563  usage: (* &rest NUMBERS-OR-MARKERS)") Line 2579  usage: (* &rest NUMBERS-OR-MARKERS)")
2579  }  }
2580    
2581  DEFUN ("/", Fquo, Squo, 2, MANY, 0,  DEFUN ("/", Fquo, Squo, 2, MANY, 0,
2582    "Returns first argument divided by all the remaining arguments.\n\         doc: /* Returns first argument divided by all the remaining arguments.
2583  The arguments must be numbers or markers.  The arguments must be numbers or markers.
2584  usage: (/ DIVIDEND DIVISOR &rest DIVISORS)")  usage: (/ DIVIDEND DIVISOR &rest DIVISORS)  */)
2585    (nargs, args)       (nargs, args)
2586       int nargs;       int nargs;
2587       Lisp_Object *args;       Lisp_Object *args;
2588  {  {
# Line 2574  usage: (/ DIVIDEND DIVISOR &rest DIVISOR Line 2590  usage: (/ DIVIDEND DIVISOR &rest DIVISOR
2590  }  }
2591    
2592  DEFUN ("%", Frem, Srem, 2, 2, 0,  DEFUN ("%", Frem, Srem, 2, 2, 0,
2593    "Returns remainder of X divided by Y.\n\         doc: /* Returns remainder of X divided by Y.
2594  Both must be integers or markers.")  Both must be integers or markers.  */)
2595    (x, y)       (x, y)
2596       register Lisp_Object x, y;       register Lisp_Object x, y;
2597  {  {
2598    Lisp_Object val;    Lisp_Object val;
# Line 2615  fmod (f1, f2) Line 2631  fmod (f1, f2)
2631  #endif /* ! HAVE_FMOD */  #endif /* ! HAVE_FMOD */
2632    
2633  DEFUN ("mod", Fmod, Smod, 2, 2, 0,  DEFUN ("mod", Fmod, Smod, 2, 2, 0,
2634    "Returns X modulo Y.\n\         doc: /* Returns X modulo Y.
2635  The result falls between zero (inclusive) and Y (exclusive).\n\  The result falls between zero (inclusive) and Y (exclusive).
2636  Both X and Y must be numbers or markers.")  Both X and Y must be numbers or markers.  */)
2637    (x, y)       (x, y)
2638       register Lisp_Object x, y;       register Lisp_Object x, y;
2639  {  {
2640    Lisp_Object val;    Lisp_Object val;
# Line 2647  Both X and Y must be numbers or markers. Line 2663  Both X and Y must be numbers or markers.
2663  }  }
2664    
2665  DEFUN ("max", Fmax, Smax, 1, MANY, 0,  DEFUN ("max", Fmax, Smax, 1, MANY, 0,
2666    "Return largest of all the arguments (which must be numbers or markers).\n\         doc: /* Return largest of all the arguments (which must be numbers or markers).
2667  The value is always a number; markers are converted to numbers.  The value is always a number; markers are converted to numbers.
2668  usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS)")  usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS)  */)
2669    (nargs, args)       (nargs, args)
2670       int nargs;       int nargs;
2671       Lisp_Object *args;       Lisp_Object *args;
2672  {  {
# Line 2658  usage: (max NUMBER-OR-MARKER &rest NUMBE Line 2674  usage: (max NUMBER-OR-MARKER &rest NUMBE
2674  }  }
2675    
2676  DEFUN ("min", Fmin, Smin, 1, MANY, 0,  DEFUN ("min", Fmin, Smin, 1, MANY, 0,
2677    "Return smallest of all the arguments (which must be numbers or markers).\n\         doc: /* Return smallest of all the arguments (which must be numbers or markers).
2678  The value is always a number; markers are converted to numbers.  The value is always a number; markers are converted to numbers.
2679  usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS)")  usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS)  */)
2680    (nargs, args)       (nargs, args)
2681       int nargs;       int nargs;
2682       Lisp_Object *args;       Lisp_Object *args;
2683  {  {
# Line 2669  usage: (min NUMBER-OR-MARKER &rest NUMBE Line 2685  usage: (min NUMBER-OR-MARKER &rest NUMBE
2685  }  }
2686    
2687  DEFUN ("logand", Flogand, Slogand, 0, MANY, 0,  DEFUN ("logand", Flogand, Slogand, 0, MANY, 0,
2688    "Return bitwise-and of all the arguments.\n\         doc: /* Return bitwise-and of all the arguments.
2689  Arguments may be integers, or markers converted to integers.  Arguments may be integers, or markers converted to integers.
2690  usage: (logand &rest INTS-OR-MARKERS)")  usage: (logand &rest INTS-OR-MARKERS)  */)
2691    (nargs, args)       (nargs, args)
2692       int nargs;       int nargs;
2693       Lisp_Object *args;       Lisp_Object *args;
2694  {  {
# Line 2680  usage: (logand &rest INTS-OR-MARKERS)") Line 2696  usage: (logand &rest INTS-OR-MARKERS)")
2696  }  }
2697    
2698  DEFUN ("logior", Flogior, Slogior, 0, MANY, 0,  DEFUN ("logior", Flogior, Slogior, 0, MANY, 0,
2699    "Return bitwise-or of all the arguments.\n\         doc: /* Return bitwise-or of all the arguments.
2700  Arguments may be integers, or markers converted to integers.  Arguments may be integers, or markers converted to integers.
2701  usage: (logior &rest INTS-OR-MARKERS)")  usage: (logior &rest INTS-OR-MARKERS)  */)
2702    (nargs, args)       (nargs, args)
2703       int nargs;       int nargs;
2704       Lisp_Object *args;       Lisp_Object *args;
2705  {  {
# Line 2691  usage: (logior &rest INTS-OR-MARKERS)") Line 2707  usage: (logior &rest INTS-OR-MARKERS)")
2707  }  }
2708    
2709  DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0,  DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0,
2710    "Return bitwise-exclusive-or of all the arguments.\n\         doc: /* Return bitwise-exclusive-or of all the arguments.
2711  Arguments may be integers, or markers converted to integers.  Arguments may be integers, or markers converted to integers.
2712  usage: (logxor &rest INTS-OR-MARKERS)")  usage: (logxor &rest INTS-OR-MARKERS) */)
2713    (nargs, args)       (nargs, args)
2714       int nargs;       int nargs;
2715       Lisp_Object *args;       Lisp_Object *args;
2716  {  {
# Line 2702  usage: (logxor &rest INTS-OR-MARKERS)") Line 2718  usage: (logxor &rest INTS-OR-MARKERS)")
2718  }  }
2719    
2720  DEFUN ("ash", Fash, Sash, 2, 2, 0,  DEFUN ("ash", Fash, Sash, 2, 2, 0,
2721    "Return VALUE with its bits shifted left by COUNT.\n\         doc: /* Return VALUE with its bits shifted left by COUNT.
2722  If COUNT is negative, shifting is actually to the right.\n\  If COUNT is negative, shifting is actually to the right.
2723  In this case, the sign bit is duplicated.")  In this case, the sign bit is duplicated.  */)
2724    (value, count)       (value, count)
2725       register Lisp_Object value, count;       register Lisp_Object value, count;
2726  {  {
2727    register Lisp_Object val;    register Lisp_Object val;
# Line 2725  In this case, the sign bit is duplicated Line 2741  In this case, the sign bit is duplicated
2741  }  }
2742    
2743  DEFUN ("lsh", Flsh, Slsh, 2, 2, 0,  DEFUN ("lsh", Flsh, Slsh, 2, 2, 0,
2744    "Return VALUE with its bits shifted left by COUNT.\n\         doc: /* Return VALUE with its bits shifted left by COUNT.
2745  If COUNT is negative, shifting is actually to the right.\n\  If COUNT is negative, shifting is actually to the right.
2746  In this case,  zeros are shifted in on the left.")  In this case,  zeros are shifted in on the left.  */)
2747    (value, count)       (value, count)
2748       register Lisp_Object value, count;       register Lisp_Object value, count;
2749  {  {
2750    register Lisp_Object val;    register Lisp_Object val;
# Line 2748  In this case,  zeros are shifted in on t Line 2764  In this case,  zeros are shifted in on t
2764  }  }
2765    
2766  DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0,  DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0,
2767    "Return NUMBER plus one.  NUMBER may be a number or a marker.\n\         doc: /* Return NUMBER plus one.  NUMBER may be a number or a marker.
2768  Markers are converted to integers.")  Markers are converted to integers.  */)
2769    (number)       (number)
2770       register Lisp_Object number;       register Lisp_Object number;
2771  {  {
2772    CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number, 0);    CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number, 0);
# Line 2763  Markers are converted to integers.") Line 2779  Markers are converted to integers.")
2779  }  }
2780    
2781  DEFUN ("1-", Fsub1, Ssub1, 1, 1, 0,  DEFUN ("1-", Fsub1, Ssub1, 1, 1, 0,
2782    "Return NUMBER minus one.  NUMBER may be a number or a marker.\n\         doc: /* Return NUMBER minus one.  NUMBER may be a number or a marker.
2783  Markers are converted to integers.")  Markers are converted to integers.  */)
2784    (number)       (number)
2785       register Lisp_Object number;       register Lisp_Object number;
2786  {  {
2787    CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number, 0);    CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number, 0);
# Line 2778  Markers are converted to integers.") Line 2794  Markers are converted to integers.")
2794  }  }
2795    
2796  DEFUN ("lognot", Flognot, Slognot, 1, 1, 0,  DEFUN ("lognot", Flognot, Slognot, 1, 1, 0,
2797    "Return the bitwise complement of NUMBER.  NUMBER must be an integer.")         doc: /* Return the bitwise complement of NUMBER.  NUMBER must be an integer.  */)
2798    (number)       (number)
2799       register Lisp_Object number;       register Lisp_Object number;
2800  {  {
2801    CHECK_NUMBER (number, 0);    CHECK_NUMBER (number, 0);
# Line 3192  syms_of_data () Line 3208  syms_of_data ()
3208    XSYMBOL (Qwholenump)->function = XSYMBOL (Qnatnump)->function;    XSYMBOL (Qwholenump)->function = XSYMBOL (Qnatnump)->function;
3209    
3210    DEFVAR_INT ("most-positive-fixnum", &most_positive_fixnum,    DEFVAR_INT ("most-positive-fixnum", &most_positive_fixnum,
3211      "The largest value that is representable in a Lisp integer.");                doc: /* The largest value that is representable in a Lisp integer.  */);
3212    most_positive_fixnum = MOST_POSITIVE_FIXNUM;    most_positive_fixnum = MOST_POSITIVE_FIXNUM;
3213        
3214    DEFVAR_INT ("most-negative-fixnum", &most_negative_fixnum,    DEFVAR_INT ("most-negative-fixnum", &most_negative_fixnum,
3215      "The smallest value that is representable in a Lisp integer.");                doc: /* The smallest value that is representable in a Lisp integer.  */);
3216    most_negative_fixnum = MOST_NEGATIVE_FIXNUM;    most_negative_fixnum = MOST_NEGATIVE_FIXNUM;
3217  }  }
3218    
# Line 3239  init_data () Line 3255  init_data ()
3255    signal (SIGEMT, arith_error);    signal (SIGEMT, arith_error);
3256  #endif /* uts */  #endif /* uts */
3257  }  }
   
   

Legend:
Removed from v.1.202  
changed lines
  Added in v.1.203

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26