comparison src/data.c @ 109179:8cfee7d2955f

Convert DEFUNs to standard C. * src/alloc.c: Convert DEFUNs to standard C. * src/buffer.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/character.c: * src/charset.c: * src/chartab.c: * src/cmds.c: * src/coding.c: * src/composite.c: * src/data.c: * src/dbusbind.c: * src/dired.c: * src/dispnew.c: * src/doc.c: * src/dosfns.c: * src/editfns.c: * src/emacs.c: * src/eval.c: * src/fileio.c: * src/filelock.c: * src/floatfns.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/image.c: * src/indent.c: * src/insdel.c: * src/keyboard.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/menu.c: * src/minibuf.c: * src/msdos.c: * src/nsfns.m: * src/nsmenu.m: * src/nsselect.m: * src/print.c: * src/process.c: * src/search.c: * src/sound.c: * src/syntax.c: * src/term.c: * src/terminal.c: * src/textprop.c: * src/undo.c: * src/w16select.c: * src/w32console.c: * src/w32fns.c: * src/w32font.c: * src/w32menu.c: * src/w32proc.c: * src/w32select.c: * src/window.c: * src/xdisp.c: * src/xfaces.c: * src/xfns.c: * src/xmenu.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: Likewise.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 08 Jul 2010 14:25:08 -0700
parents 750db9f3e6d8
children 05e7e7c46ff0
comparison
equal deleted inserted replaced
109178:53f8ebcd9a97 109179:8cfee7d2955f
152 152
153 /* Data type predicates */ 153 /* Data type predicates */
154 154
155 DEFUN ("eq", Feq, Seq, 2, 2, 0, 155 DEFUN ("eq", Feq, Seq, 2, 2, 0,
156 doc: /* Return t if the two args are the same Lisp object. */) 156 doc: /* Return t if the two args are the same Lisp object. */)
157 (obj1, obj2) 157 (Lisp_Object obj1, Lisp_Object obj2)
158 Lisp_Object obj1, obj2;
159 { 158 {
160 if (EQ (obj1, obj2)) 159 if (EQ (obj1, obj2))
161 return Qt; 160 return Qt;
162 return Qnil; 161 return Qnil;
163 } 162 }
164 163
165 DEFUN ("null", Fnull, Snull, 1, 1, 0, 164 DEFUN ("null", Fnull, Snull, 1, 1, 0,
166 doc: /* Return t if OBJECT is nil. */) 165 doc: /* Return t if OBJECT is nil. */)
167 (object) 166 (Lisp_Object object)
168 Lisp_Object object;
169 { 167 {
170 if (NILP (object)) 168 if (NILP (object))
171 return Qt; 169 return Qt;
172 return Qnil; 170 return Qnil;
173 } 171 }
174 172
175 DEFUN ("type-of", Ftype_of, Stype_of, 1, 1, 0, 173 DEFUN ("type-of", Ftype_of, Stype_of, 1, 1, 0,
176 doc: /* Return a symbol representing the type of OBJECT. 174 doc: /* Return a symbol representing the type of OBJECT.
177 The symbol returned names the object's basic type; 175 The symbol returned names the object's basic type;
178 for example, (type-of 1) returns `integer'. */) 176 for example, (type-of 1) returns `integer'. */)
179 (object) 177 (Lisp_Object object)
180 Lisp_Object object;
181 { 178 {
182 switch (XTYPE (object)) 179 switch (XTYPE (object))
183 { 180 {
184 case_Lisp_Int: 181 case_Lisp_Int:
185 return Qinteger; 182 return Qinteger;
242 } 239 }
243 } 240 }
244 241
245 DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0, 242 DEFUN ("consp", Fconsp, Sconsp, 1, 1, 0,
246 doc: /* Return t if OBJECT is a cons cell. */) 243 doc: /* Return t if OBJECT is a cons cell. */)
247 (object) 244 (Lisp_Object object)
248 Lisp_Object object;
249 { 245 {
250 if (CONSP (object)) 246 if (CONSP (object))
251 return Qt; 247 return Qt;
252 return Qnil; 248 return Qnil;
253 } 249 }
254 250
255 DEFUN ("atom", Fatom, Satom, 1, 1, 0, 251 DEFUN ("atom", Fatom, Satom, 1, 1, 0,
256 doc: /* Return t if OBJECT is not a cons cell. This includes nil. */) 252 doc: /* Return t if OBJECT is not a cons cell. This includes nil. */)
257 (object) 253 (Lisp_Object object)
258 Lisp_Object object;
259 { 254 {
260 if (CONSP (object)) 255 if (CONSP (object))
261 return Qnil; 256 return Qnil;
262 return Qt; 257 return Qt;
263 } 258 }
264 259
265 DEFUN ("listp", Flistp, Slistp, 1, 1, 0, 260 DEFUN ("listp", Flistp, Slistp, 1, 1, 0,
266 doc: /* Return t if OBJECT is a list, that is, a cons cell or nil. 261 doc: /* Return t if OBJECT is a list, that is, a cons cell or nil.
267 Otherwise, return nil. */) 262 Otherwise, return nil. */)
268 (object) 263 (Lisp_Object object)
269 Lisp_Object object;
270 { 264 {
271 if (CONSP (object) || NILP (object)) 265 if (CONSP (object) || NILP (object))
272 return Qt; 266 return Qt;
273 return Qnil; 267 return Qnil;
274 } 268 }
275 269
276 DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, 0, 270 DEFUN ("nlistp", Fnlistp, Snlistp, 1, 1, 0,
277 doc: /* Return t if OBJECT is not a list. Lists include nil. */) 271 doc: /* Return t if OBJECT is not a list. Lists include nil. */)
278 (object) 272 (Lisp_Object object)
279 Lisp_Object object;
280 { 273 {
281 if (CONSP (object) || NILP (object)) 274 if (CONSP (object) || NILP (object))
282 return Qnil; 275 return Qnil;
283 return Qt; 276 return Qt;
284 } 277 }
285 278
286 DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1, 1, 0, 279 DEFUN ("symbolp", Fsymbolp, Ssymbolp, 1, 1, 0,
287 doc: /* Return t if OBJECT is a symbol. */) 280 doc: /* Return t if OBJECT is a symbol. */)
288 (object) 281 (Lisp_Object object)
289 Lisp_Object object;
290 { 282 {
291 if (SYMBOLP (object)) 283 if (SYMBOLP (object))
292 return Qt; 284 return Qt;
293 return Qnil; 285 return Qnil;
294 } 286 }
297 name. */ 289 name. */
298 DEFUN ("keywordp", Fkeywordp, Skeywordp, 1, 1, 0, 290 DEFUN ("keywordp", Fkeywordp, Skeywordp, 1, 1, 0,
299 doc: /* Return t if OBJECT is a keyword. 291 doc: /* Return t if OBJECT is a keyword.
300 This means that it is a symbol with a print name beginning with `:' 292 This means that it is a symbol with a print name beginning with `:'
301 interned in the initial obarray. */) 293 interned in the initial obarray. */)
302 (object) 294 (Lisp_Object object)
303 Lisp_Object object;
304 { 295 {
305 if (SYMBOLP (object) 296 if (SYMBOLP (object)
306 && SREF (SYMBOL_NAME (object), 0) == ':' 297 && SREF (SYMBOL_NAME (object), 0) == ':'
307 && SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (object)) 298 && SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (object))
308 return Qt; 299 return Qt;
309 return Qnil; 300 return Qnil;
310 } 301 }
311 302
312 DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0, 303 DEFUN ("vectorp", Fvectorp, Svectorp, 1, 1, 0,
313 doc: /* Return t if OBJECT is a vector. */) 304 doc: /* Return t if OBJECT is a vector. */)
314 (object) 305 (Lisp_Object object)
315 Lisp_Object object;
316 { 306 {
317 if (VECTORP (object)) 307 if (VECTORP (object))
318 return Qt; 308 return Qt;
319 return Qnil; 309 return Qnil;
320 } 310 }
321 311
322 DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0, 312 DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0,
323 doc: /* Return t if OBJECT is a string. */) 313 doc: /* Return t if OBJECT is a string. */)
324 (object) 314 (Lisp_Object object)
325 Lisp_Object object;
326 { 315 {
327 if (STRINGP (object)) 316 if (STRINGP (object))
328 return Qt; 317 return Qt;
329 return Qnil; 318 return Qnil;
330 } 319 }
331 320
332 DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p, 321 DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p,
333 1, 1, 0, 322 1, 1, 0,
334 doc: /* Return t if OBJECT is a multibyte string. */) 323 doc: /* Return t if OBJECT is a multibyte string. */)
335 (object) 324 (Lisp_Object object)
336 Lisp_Object object;
337 { 325 {
338 if (STRINGP (object) && STRING_MULTIBYTE (object)) 326 if (STRINGP (object) && STRING_MULTIBYTE (object))
339 return Qt; 327 return Qt;
340 return Qnil; 328 return Qnil;
341 } 329 }
342 330
343 DEFUN ("char-table-p", Fchar_table_p, Schar_table_p, 1, 1, 0, 331 DEFUN ("char-table-p", Fchar_table_p, Schar_table_p, 1, 1, 0,
344 doc: /* Return t if OBJECT is a char-table. */) 332 doc: /* Return t if OBJECT is a char-table. */)
345 (object) 333 (Lisp_Object object)
346 Lisp_Object object;
347 { 334 {
348 if (CHAR_TABLE_P (object)) 335 if (CHAR_TABLE_P (object))
349 return Qt; 336 return Qt;
350 return Qnil; 337 return Qnil;
351 } 338 }
352 339
353 DEFUN ("vector-or-char-table-p", Fvector_or_char_table_p, 340 DEFUN ("vector-or-char-table-p", Fvector_or_char_table_p,
354 Svector_or_char_table_p, 1, 1, 0, 341 Svector_or_char_table_p, 1, 1, 0,
355 doc: /* Return t if OBJECT is a char-table or vector. */) 342 doc: /* Return t if OBJECT is a char-table or vector. */)
356 (object) 343 (Lisp_Object object)
357 Lisp_Object object;
358 { 344 {
359 if (VECTORP (object) || CHAR_TABLE_P (object)) 345 if (VECTORP (object) || CHAR_TABLE_P (object))
360 return Qt; 346 return Qt;
361 return Qnil; 347 return Qnil;
362 } 348 }
363 349
364 DEFUN ("bool-vector-p", Fbool_vector_p, Sbool_vector_p, 1, 1, 0, 350 DEFUN ("bool-vector-p", Fbool_vector_p, Sbool_vector_p, 1, 1, 0,
365 doc: /* Return t if OBJECT is a bool-vector. */) 351 doc: /* Return t if OBJECT is a bool-vector. */)
366 (object) 352 (Lisp_Object object)
367 Lisp_Object object;
368 { 353 {
369 if (BOOL_VECTOR_P (object)) 354 if (BOOL_VECTOR_P (object))
370 return Qt; 355 return Qt;
371 return Qnil; 356 return Qnil;
372 } 357 }
373 358
374 DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, 0, 359 DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, 0,
375 doc: /* Return t if OBJECT is an array (string or vector). */) 360 doc: /* Return t if OBJECT is an array (string or vector). */)
376 (object) 361 (Lisp_Object object)
377 Lisp_Object object;
378 { 362 {
379 if (ARRAYP (object)) 363 if (ARRAYP (object))
380 return Qt; 364 return Qt;
381 return Qnil; 365 return Qnil;
382 } 366 }
383 367
384 DEFUN ("sequencep", Fsequencep, Ssequencep, 1, 1, 0, 368 DEFUN ("sequencep", Fsequencep, Ssequencep, 1, 1, 0,
385 doc: /* Return t if OBJECT is a sequence (list or array). */) 369 doc: /* Return t if OBJECT is a sequence (list or array). */)
386 (object) 370 (register Lisp_Object object)
387 register Lisp_Object object;
388 { 371 {
389 if (CONSP (object) || NILP (object) || ARRAYP (object)) 372 if (CONSP (object) || NILP (object) || ARRAYP (object))
390 return Qt; 373 return Qt;
391 return Qnil; 374 return Qnil;
392 } 375 }
393 376
394 DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0, 377 DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0,
395 doc: /* Return t if OBJECT is an editor buffer. */) 378 doc: /* Return t if OBJECT is an editor buffer. */)
396 (object) 379 (Lisp_Object object)
397 Lisp_Object object;
398 { 380 {
399 if (BUFFERP (object)) 381 if (BUFFERP (object))
400 return Qt; 382 return Qt;
401 return Qnil; 383 return Qnil;
402 } 384 }
403 385
404 DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0, 386 DEFUN ("markerp", Fmarkerp, Smarkerp, 1, 1, 0,
405 doc: /* Return t if OBJECT is a marker (editor pointer). */) 387 doc: /* Return t if OBJECT is a marker (editor pointer). */)
406 (object) 388 (Lisp_Object object)
407 Lisp_Object object;
408 { 389 {
409 if (MARKERP (object)) 390 if (MARKERP (object))
410 return Qt; 391 return Qt;
411 return Qnil; 392 return Qnil;
412 } 393 }
413 394
414 DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, 395 DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0,
415 doc: /* Return t if OBJECT is a built-in function. */) 396 doc: /* Return t if OBJECT is a built-in function. */)
416 (object) 397 (Lisp_Object object)
417 Lisp_Object object;
418 { 398 {
419 if (SUBRP (object)) 399 if (SUBRP (object))
420 return Qt; 400 return Qt;
421 return Qnil; 401 return Qnil;
422 } 402 }
423 403
424 DEFUN ("byte-code-function-p", Fbyte_code_function_p, Sbyte_code_function_p, 404 DEFUN ("byte-code-function-p", Fbyte_code_function_p, Sbyte_code_function_p,
425 1, 1, 0, 405 1, 1, 0,
426 doc: /* Return t if OBJECT is a byte-compiled function object. */) 406 doc: /* Return t if OBJECT is a byte-compiled function object. */)
427 (object) 407 (Lisp_Object object)
428 Lisp_Object object;
429 { 408 {
430 if (COMPILEDP (object)) 409 if (COMPILEDP (object))
431 return Qt; 410 return Qt;
432 return Qnil; 411 return Qnil;
433 } 412 }
434 413
435 DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0, 414 DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0,
436 doc: /* Return t if OBJECT is a character or a string. */) 415 doc: /* Return t if OBJECT is a character or a string. */)
437 (object) 416 (register Lisp_Object object)
438 register Lisp_Object object;
439 { 417 {
440 if (CHARACTERP (object) || STRINGP (object)) 418 if (CHARACTERP (object) || STRINGP (object))
441 return Qt; 419 return Qt;
442 return Qnil; 420 return Qnil;
443 } 421 }
444 422
445 DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0, 423 DEFUN ("integerp", Fintegerp, Sintegerp, 1, 1, 0,
446 doc: /* Return t if OBJECT is an integer. */) 424 doc: /* Return t if OBJECT is an integer. */)
447 (object) 425 (Lisp_Object object)
448 Lisp_Object object;
449 { 426 {
450 if (INTEGERP (object)) 427 if (INTEGERP (object))
451 return Qt; 428 return Qt;
452 return Qnil; 429 return Qnil;
453 } 430 }
454 431
455 DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, 0, 432 DEFUN ("integer-or-marker-p", Finteger_or_marker_p, Sinteger_or_marker_p, 1, 1, 0,
456 doc: /* Return t if OBJECT is an integer or a marker (editor pointer). */) 433 doc: /* Return t if OBJECT is an integer or a marker (editor pointer). */)
457 (object) 434 (register Lisp_Object object)
458 register Lisp_Object object;
459 { 435 {
460 if (MARKERP (object) || INTEGERP (object)) 436 if (MARKERP (object) || INTEGERP (object))
461 return Qt; 437 return Qt;
462 return Qnil; 438 return Qnil;
463 } 439 }
464 440
465 DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0, 441 DEFUN ("natnump", Fnatnump, Snatnump, 1, 1, 0,
466 doc: /* Return t if OBJECT is a nonnegative integer. */) 442 doc: /* Return t if OBJECT is a nonnegative integer. */)
467 (object) 443 (Lisp_Object object)
468 Lisp_Object object;
469 { 444 {
470 if (NATNUMP (object)) 445 if (NATNUMP (object))
471 return Qt; 446 return Qt;
472 return Qnil; 447 return Qnil;
473 } 448 }
474 449
475 DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0, 450 DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0,
476 doc: /* Return t if OBJECT is a number (floating point or integer). */) 451 doc: /* Return t if OBJECT is a number (floating point or integer). */)
477 (object) 452 (Lisp_Object object)
478 Lisp_Object object;
479 { 453 {
480 if (NUMBERP (object)) 454 if (NUMBERP (object))
481 return Qt; 455 return Qt;
482 else 456 else
483 return Qnil; 457 return Qnil;
484 } 458 }
485 459
486 DEFUN ("number-or-marker-p", Fnumber_or_marker_p, 460 DEFUN ("number-or-marker-p", Fnumber_or_marker_p,
487 Snumber_or_marker_p, 1, 1, 0, 461 Snumber_or_marker_p, 1, 1, 0,
488 doc: /* Return t if OBJECT is a number or a marker. */) 462 doc: /* Return t if OBJECT is a number or a marker. */)
489 (object) 463 (Lisp_Object object)
490 Lisp_Object object;
491 { 464 {
492 if (NUMBERP (object) || MARKERP (object)) 465 if (NUMBERP (object) || MARKERP (object))
493 return Qt; 466 return Qt;
494 return Qnil; 467 return Qnil;
495 } 468 }
496 469
497 DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0, 470 DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0,
498 doc: /* Return t if OBJECT is a floating point number. */) 471 doc: /* Return t if OBJECT is a floating point number. */)
499 (object) 472 (Lisp_Object object)
500 Lisp_Object object;
501 { 473 {
502 if (FLOATP (object)) 474 if (FLOATP (object))
503 return Qt; 475 return Qt;
504 return Qnil; 476 return Qnil;
505 } 477 }
511 doc: /* Return the car of LIST. If arg is nil, return nil. 483 doc: /* Return the car of LIST. If arg is nil, return nil.
512 Error if arg is not nil and not a cons cell. See also `car-safe'. 484 Error if arg is not nil and not a cons cell. See also `car-safe'.
513 485
514 See Info node `(elisp)Cons Cells' for a discussion of related basic 486 See Info node `(elisp)Cons Cells' for a discussion of related basic
515 Lisp concepts such as car, cdr, cons cell and list. */) 487 Lisp concepts such as car, cdr, cons cell and list. */)
516 (list) 488 (register Lisp_Object list)
517 register Lisp_Object list;
518 { 489 {
519 return CAR (list); 490 return CAR (list);
520 } 491 }
521 492
522 DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, 493 DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0,
523 doc: /* Return the car of OBJECT if it is a cons cell, or else nil. */) 494 doc: /* Return the car of OBJECT if it is a cons cell, or else nil. */)
524 (object) 495 (Lisp_Object object)
525 Lisp_Object object;
526 { 496 {
527 return CAR_SAFE (object); 497 return CAR_SAFE (object);
528 } 498 }
529 499
530 DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, 500 DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0,
531 doc: /* Return the cdr of LIST. If arg is nil, return nil. 501 doc: /* Return the cdr of LIST. If arg is nil, return nil.
532 Error if arg is not nil and not a cons cell. See also `cdr-safe'. 502 Error if arg is not nil and not a cons cell. See also `cdr-safe'.
533 503
534 See Info node `(elisp)Cons Cells' for a discussion of related basic 504 See Info node `(elisp)Cons Cells' for a discussion of related basic
535 Lisp concepts such as cdr, car, cons cell and list. */) 505 Lisp concepts such as cdr, car, cons cell and list. */)
536 (list) 506 (register Lisp_Object list)
537 register Lisp_Object list;
538 { 507 {
539 return CDR (list); 508 return CDR (list);
540 } 509 }
541 510
542 DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, 511 DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0,
543 doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil. */) 512 doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil. */)
544 (object) 513 (Lisp_Object object)
545 Lisp_Object object;
546 { 514 {
547 return CDR_SAFE (object); 515 return CDR_SAFE (object);
548 } 516 }
549 517
550 DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, 518 DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0,
551 doc: /* Set the car of CELL to be NEWCAR. Returns NEWCAR. */) 519 doc: /* Set the car of CELL to be NEWCAR. Returns NEWCAR. */)
552 (cell, newcar) 520 (register Lisp_Object cell, Lisp_Object newcar)
553 register Lisp_Object cell, newcar;
554 { 521 {
555 CHECK_CONS (cell); 522 CHECK_CONS (cell);
556 CHECK_IMPURE (cell); 523 CHECK_IMPURE (cell);
557 XSETCAR (cell, newcar); 524 XSETCAR (cell, newcar);
558 return newcar; 525 return newcar;
559 } 526 }
560 527
561 DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, 528 DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0,
562 doc: /* Set the cdr of CELL to be NEWCDR. Returns NEWCDR. */) 529 doc: /* Set the cdr of CELL to be NEWCDR. Returns NEWCDR. */)
563 (cell, newcdr) 530 (register Lisp_Object cell, Lisp_Object newcdr)
564 register Lisp_Object cell, newcdr;
565 { 531 {
566 CHECK_CONS (cell); 532 CHECK_CONS (cell);
567 CHECK_IMPURE (cell); 533 CHECK_IMPURE (cell);
568 XSETCDR (cell, newcdr); 534 XSETCDR (cell, newcdr);
569 return newcdr; 535 return newcdr;
571 537
572 /* Extract and set components of symbols */ 538 /* Extract and set components of symbols */
573 539
574 DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0, 540 DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0,
575 doc: /* Return t if SYMBOL's value is not void. */) 541 doc: /* Return t if SYMBOL's value is not void. */)
576 (symbol) 542 (register Lisp_Object symbol)
577 register Lisp_Object symbol;
578 { 543 {
579 Lisp_Object valcontents; 544 Lisp_Object valcontents;
580 struct Lisp_Symbol *sym; 545 struct Lisp_Symbol *sym;
581 CHECK_SYMBOL (symbol); 546 CHECK_SYMBOL (symbol);
582 sym = XSYMBOL (symbol); 547 sym = XSYMBOL (symbol);
610 return (EQ (valcontents, Qunbound) ? Qnil : Qt); 575 return (EQ (valcontents, Qunbound) ? Qnil : Qt);
611 } 576 }
612 577
613 DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0, 578 DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0,
614 doc: /* Return t if SYMBOL's function definition is not void. */) 579 doc: /* Return t if SYMBOL's function definition is not void. */)
615 (symbol) 580 (register Lisp_Object symbol)
616 register Lisp_Object symbol;
617 { 581 {
618 CHECK_SYMBOL (symbol); 582 CHECK_SYMBOL (symbol);
619 return (EQ (XSYMBOL (symbol)->function, Qunbound) ? Qnil : Qt); 583 return (EQ (XSYMBOL (symbol)->function, Qunbound) ? Qnil : Qt);
620 } 584 }
621 585
622 DEFUN ("makunbound", Fmakunbound, Smakunbound, 1, 1, 0, 586 DEFUN ("makunbound", Fmakunbound, Smakunbound, 1, 1, 0,
623 doc: /* Make SYMBOL's value be void. 587 doc: /* Make SYMBOL's value be void.
624 Return SYMBOL. */) 588 Return SYMBOL. */)
625 (symbol) 589 (register Lisp_Object symbol)
626 register Lisp_Object symbol;
627 { 590 {
628 CHECK_SYMBOL (symbol); 591 CHECK_SYMBOL (symbol);
629 if (SYMBOL_CONSTANT_P (symbol)) 592 if (SYMBOL_CONSTANT_P (symbol))
630 xsignal1 (Qsetting_constant, symbol); 593 xsignal1 (Qsetting_constant, symbol);
631 Fset (symbol, Qunbound); 594 Fset (symbol, Qunbound);
633 } 596 }
634 597
635 DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0, 598 DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0,
636 doc: /* Make SYMBOL's function definition be void. 599 doc: /* Make SYMBOL's function definition be void.
637 Return SYMBOL. */) 600 Return SYMBOL. */)
638 (symbol) 601 (register Lisp_Object symbol)
639 register Lisp_Object symbol;
640 { 602 {
641 CHECK_SYMBOL (symbol); 603 CHECK_SYMBOL (symbol);
642 if (NILP (symbol) || EQ (symbol, Qt)) 604 if (NILP (symbol) || EQ (symbol, Qt))
643 xsignal1 (Qsetting_constant, symbol); 605 xsignal1 (Qsetting_constant, symbol);
644 XSYMBOL (symbol)->function = Qunbound; 606 XSYMBOL (symbol)->function = Qunbound;
645 return symbol; 607 return symbol;
646 } 608 }
647 609
648 DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, 610 DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0,
649 doc: /* Return SYMBOL's function definition. Error if that is void. */) 611 doc: /* Return SYMBOL's function definition. Error if that is void. */)
650 (symbol) 612 (register Lisp_Object symbol)
651 register Lisp_Object symbol;
652 { 613 {
653 CHECK_SYMBOL (symbol); 614 CHECK_SYMBOL (symbol);
654 if (!EQ (XSYMBOL (symbol)->function, Qunbound)) 615 if (!EQ (XSYMBOL (symbol)->function, Qunbound))
655 return XSYMBOL (symbol)->function; 616 return XSYMBOL (symbol)->function;
656 xsignal1 (Qvoid_function, symbol); 617 xsignal1 (Qvoid_function, symbol);
657 } 618 }
658 619
659 DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, 620 DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0,
660 doc: /* Return SYMBOL's property list. */) 621 doc: /* Return SYMBOL's property list. */)
661 (symbol) 622 (register Lisp_Object symbol)
662 register Lisp_Object symbol;
663 { 623 {
664 CHECK_SYMBOL (symbol); 624 CHECK_SYMBOL (symbol);
665 return XSYMBOL (symbol)->plist; 625 return XSYMBOL (symbol)->plist;
666 } 626 }
667 627
668 DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0, 628 DEFUN ("symbol-name", Fsymbol_name, Ssymbol_name, 1, 1, 0,
669 doc: /* Return SYMBOL's name, a string. */) 629 doc: /* Return SYMBOL's name, a string. */)
670 (symbol) 630 (register Lisp_Object symbol)
671 register Lisp_Object symbol;
672 { 631 {
673 register Lisp_Object name; 632 register Lisp_Object name;
674 633
675 CHECK_SYMBOL (symbol); 634 CHECK_SYMBOL (symbol);
676 name = SYMBOL_NAME (symbol); 635 name = SYMBOL_NAME (symbol);
677 return name; 636 return name;
678 } 637 }
679 638
680 DEFUN ("fset", Ffset, Sfset, 2, 2, 0, 639 DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
681 doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. */) 640 doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. */)
682 (symbol, definition) 641 (register Lisp_Object symbol, Lisp_Object definition)
683 register Lisp_Object symbol, definition;
684 { 642 {
685 register Lisp_Object function; 643 register Lisp_Object function;
686 644
687 CHECK_SYMBOL (symbol); 645 CHECK_SYMBOL (symbol);
688 if (NILP (symbol) || EQ (symbol, Qt)) 646 if (NILP (symbol) || EQ (symbol, Qt))
712 doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION. 670 doc: /* Set SYMBOL's function definition to DEFINITION, and return DEFINITION.
713 Associates the function with the current load file, if any. 671 Associates the function with the current load file, if any.
714 The optional third argument DOCSTRING specifies the documentation string 672 The optional third argument DOCSTRING specifies the documentation string
715 for SYMBOL; if it is omitted or nil, SYMBOL uses the documentation string 673 for SYMBOL; if it is omitted or nil, SYMBOL uses the documentation string
716 determined by DEFINITION. */) 674 determined by DEFINITION. */)
717 (symbol, definition, docstring) 675 (register Lisp_Object symbol, Lisp_Object definition, Lisp_Object docstring)
718 register Lisp_Object symbol, definition, docstring;
719 { 676 {
720 CHECK_SYMBOL (symbol); 677 CHECK_SYMBOL (symbol);
721 if (CONSP (XSYMBOL (symbol)->function) 678 if (CONSP (XSYMBOL (symbol)->function)
722 && EQ (XCAR (XSYMBOL (symbol)->function), Qautoload)) 679 && EQ (XCAR (XSYMBOL (symbol)->function), Qautoload))
723 LOADHIST_ATTACH (Fcons (Qt, symbol)); 680 LOADHIST_ATTACH (Fcons (Qt, symbol));
728 return definition; 685 return definition;
729 } 686 }
730 687
731 DEFUN ("setplist", Fsetplist, Ssetplist, 2, 2, 0, 688 DEFUN ("setplist", Fsetplist, Ssetplist, 2, 2, 0,
732 doc: /* Set SYMBOL's property list to NEWPLIST, and return NEWPLIST. */) 689 doc: /* Set SYMBOL's property list to NEWPLIST, and return NEWPLIST. */)
733 (symbol, newplist) 690 (register Lisp_Object symbol, Lisp_Object newplist)
734 register Lisp_Object symbol, newplist;
735 { 691 {
736 CHECK_SYMBOL (symbol); 692 CHECK_SYMBOL (symbol);
737 XSYMBOL (symbol)->plist = newplist; 693 XSYMBOL (symbol)->plist = newplist;
738 return newplist; 694 return newplist;
739 } 695 }
742 doc: /* Return minimum and maximum number of args allowed for SUBR. 698 doc: /* Return minimum and maximum number of args allowed for SUBR.
743 SUBR must be a built-in function. 699 SUBR must be a built-in function.
744 The returned value is a pair (MIN . MAX). MIN is the minimum number 700 The returned value is a pair (MIN . MAX). MIN is the minimum number
745 of args. MAX is the maximum number or the symbol `many', for a 701 of args. MAX is the maximum number or the symbol `many', for a
746 function with `&rest' args, or `unevalled' for a special form. */) 702 function with `&rest' args, or `unevalled' for a special form. */)
747 (subr) 703 (Lisp_Object subr)
748 Lisp_Object subr;
749 { 704 {
750 short minargs, maxargs; 705 short minargs, maxargs;
751 CHECK_SUBR (subr); 706 CHECK_SUBR (subr);
752 minargs = XSUBR (subr)->min_args; 707 minargs = XSUBR (subr)->min_args;
753 maxargs = XSUBR (subr)->max_args; 708 maxargs = XSUBR (subr)->max_args;
760 } 715 }
761 716
762 DEFUN ("subr-name", Fsubr_name, Ssubr_name, 1, 1, 0, 717 DEFUN ("subr-name", Fsubr_name, Ssubr_name, 1, 1, 0,
763 doc: /* Return name of subroutine SUBR. 718 doc: /* Return name of subroutine SUBR.
764 SUBR must be a built-in function. */) 719 SUBR must be a built-in function. */)
765 (subr) 720 (Lisp_Object subr)
766 Lisp_Object subr;
767 { 721 {
768 const char *name; 722 const char *name;
769 CHECK_SUBR (subr); 723 CHECK_SUBR (subr);
770 name = XSUBR (subr)->symbol_name; 724 name = XSUBR (subr)->symbol_name;
771 return make_string (name, strlen (name)); 725 return make_string (name, strlen (name));
773 727
774 DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, 728 DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0,
775 doc: /* Return the interactive form of CMD or nil if none. 729 doc: /* Return the interactive form of CMD or nil if none.
776 If CMD is not a command, the return value is nil. 730 If CMD is not a command, the return value is nil.
777 Value, if non-nil, is a list \(interactive SPEC). */) 731 Value, if non-nil, is a list \(interactive SPEC). */)
778 (cmd) 732 (Lisp_Object cmd)
779 Lisp_Object cmd;
780 { 733 {
781 Lisp_Object fun = indirect_function (cmd); /* Check cycles. */ 734 Lisp_Object fun = indirect_function (cmd); /* Check cycles. */
782 735
783 if (NILP (fun) || EQ (fun, Qunbound)) 736 if (NILP (fun) || EQ (fun, Qunbound))
784 return Qnil; 737 return Qnil;
866 doc: /* Return the variable at the end of OBJECT's variable chain. 819 doc: /* Return the variable at the end of OBJECT's variable chain.
867 If OBJECT is a symbol, follow all variable indirections and return the final 820 If OBJECT is a symbol, follow all variable indirections and return the final
868 variable. If OBJECT is not a symbol, just return it. 821 variable. If OBJECT is not a symbol, just return it.
869 Signal a cyclic-variable-indirection error if there is a loop in the 822 Signal a cyclic-variable-indirection error if there is a loop in the
870 variable chain of symbols. */) 823 variable chain of symbols. */)
871 (object) 824 (Lisp_Object object)
872 Lisp_Object object;
873 { 825 {
874 if (SYMBOLP (object)) 826 if (SYMBOLP (object))
875 XSETSYMBOL (object, indirect_variable (XSYMBOL (object))); 827 XSETSYMBOL (object, indirect_variable (XSYMBOL (object)));
876 return object; 828 return object;
877 } 829 }
1122 } 1074 }
1123 } 1075 }
1124 1076
1125 DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0, 1077 DEFUN ("symbol-value", Fsymbol_value, Ssymbol_value, 1, 1, 0,
1126 doc: /* Return SYMBOL's value. Error if that is void. */) 1078 doc: /* Return SYMBOL's value. Error if that is void. */)
1127 (symbol) 1079 (Lisp_Object symbol)
1128 Lisp_Object symbol;
1129 { 1080 {
1130 Lisp_Object val; 1081 Lisp_Object val;
1131 1082
1132 val = find_symbol_value (symbol); 1083 val = find_symbol_value (symbol);
1133 if (!EQ (val, Qunbound)) 1084 if (!EQ (val, Qunbound))
1136 xsignal1 (Qvoid_variable, symbol); 1087 xsignal1 (Qvoid_variable, symbol);
1137 } 1088 }
1138 1089
1139 DEFUN ("set", Fset, Sset, 2, 2, 0, 1090 DEFUN ("set", Fset, Sset, 2, 2, 0,
1140 doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL. */) 1091 doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL. */)
1141 (symbol, newval) 1092 (register Lisp_Object symbol, Lisp_Object newval)
1142 register Lisp_Object symbol, newval;
1143 { 1093 {
1144 set_internal (symbol, newval, Qnil, 0); 1094 set_internal (symbol, newval, Qnil, 0);
1145 return newval; 1095 return newval;
1146 } 1096 }
1147 1097
1385 1335
1386 DEFUN ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0, 1336 DEFUN ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0,
1387 doc: /* Return t if SYMBOL has a non-void default value. 1337 doc: /* Return t if SYMBOL has a non-void default value.
1388 This is the value that is seen in buffers that do not have their own values 1338 This is the value that is seen in buffers that do not have their own values
1389 for this variable. */) 1339 for this variable. */)
1390 (symbol) 1340 (Lisp_Object symbol)
1391 Lisp_Object symbol;
1392 { 1341 {
1393 register Lisp_Object value; 1342 register Lisp_Object value;
1394 1343
1395 value = default_value (symbol); 1344 value = default_value (symbol);
1396 return (EQ (value, Qunbound) ? Qnil : Qt); 1345 return (EQ (value, Qunbound) ? Qnil : Qt);
1399 DEFUN ("default-value", Fdefault_value, Sdefault_value, 1, 1, 0, 1348 DEFUN ("default-value", Fdefault_value, Sdefault_value, 1, 1, 0,
1400 doc: /* Return SYMBOL's default value. 1349 doc: /* Return SYMBOL's default value.
1401 This is the value that is seen in buffers that do not have their own values 1350 This is the value that is seen in buffers that do not have their own values
1402 for this variable. The default value is meaningful for variables with 1351 for this variable. The default value is meaningful for variables with
1403 local bindings in certain buffers. */) 1352 local bindings in certain buffers. */)
1404 (symbol) 1353 (Lisp_Object symbol)
1405 Lisp_Object symbol;
1406 { 1354 {
1407 register Lisp_Object value; 1355 register Lisp_Object value;
1408 1356
1409 value = default_value (symbol); 1357 value = default_value (symbol);
1410 if (!EQ (value, Qunbound)) 1358 if (!EQ (value, Qunbound))
1415 1363
1416 DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0, 1364 DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0,
1417 doc: /* Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated. 1365 doc: /* Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated.
1418 The default value is seen in buffers that do not have their own values 1366 The default value is seen in buffers that do not have their own values
1419 for this variable. */) 1367 for this variable. */)
1420 (symbol, value) 1368 (Lisp_Object symbol, Lisp_Object value)
1421 Lisp_Object symbol, value;
1422 { 1369 {
1423 struct Lisp_Symbol *sym; 1370 struct Lisp_Symbol *sym;
1424 1371
1425 CHECK_SYMBOL (symbol); 1372 CHECK_SYMBOL (symbol);
1426 if (SYMBOL_CONSTANT_P (symbol)) 1373 if (SYMBOL_CONSTANT_P (symbol))
1495 (setq-default VAR VALUE VAR VALUE...) 1442 (setq-default VAR VALUE VAR VALUE...)
1496 This sets each VAR's default value to the corresponding VALUE. 1443 This sets each VAR's default value to the corresponding VALUE.
1497 The VALUE for the Nth VAR can refer to the new default values 1444 The VALUE for the Nth VAR can refer to the new default values
1498 of previous VARs. 1445 of previous VARs.
1499 usage: (setq-default [VAR VALUE]...) */) 1446 usage: (setq-default [VAR VALUE]...) */)
1500 (args) 1447 (Lisp_Object args)
1501 Lisp_Object args;
1502 { 1448 {
1503 register Lisp_Object args_left; 1449 register Lisp_Object args_left;
1504 register Lisp_Object val, symbol; 1450 register Lisp_Object val, symbol;
1505 struct gcpro gcpro1; 1451 struct gcpro gcpro1;
1506 1452
1570 1516
1571 In most cases it is better to use `make-local-variable', 1517 In most cases it is better to use `make-local-variable',
1572 which makes a variable local in just one buffer. 1518 which makes a variable local in just one buffer.
1573 1519
1574 The function `default-value' gets the default value and `set-default' sets it. */) 1520 The function `default-value' gets the default value and `set-default' sets it. */)
1575 (variable) 1521 (register Lisp_Object variable)
1576 register Lisp_Object variable;
1577 { 1522 {
1578 struct Lisp_Symbol *sym; 1523 struct Lisp_Symbol *sym;
1579 struct Lisp_Buffer_Local_Value *blv = NULL; 1524 struct Lisp_Buffer_Local_Value *blv = NULL;
1580 union Lisp_Val_Fwd valcontents; 1525 union Lisp_Val_Fwd valcontents;
1581 int forwarded; 1526 int forwarded;
1648 1593
1649 See also `make-variable-buffer-local'. 1594 See also `make-variable-buffer-local'.
1650 1595
1651 Do not use `make-local-variable' to make a hook variable buffer-local. 1596 Do not use `make-local-variable' to make a hook variable buffer-local.
1652 Instead, use `add-hook' and specify t for the LOCAL argument. */) 1597 Instead, use `add-hook' and specify t for the LOCAL argument. */)
1653 (variable) 1598 (register Lisp_Object variable)
1654 register Lisp_Object variable;
1655 { 1599 {
1656 register Lisp_Object tem; 1600 register Lisp_Object tem;
1657 int forwarded; 1601 int forwarded;
1658 union Lisp_Val_Fwd valcontents; 1602 union Lisp_Val_Fwd valcontents;
1659 struct Lisp_Symbol *sym; 1603 struct Lisp_Symbol *sym;
1750 1694
1751 DEFUN ("kill-local-variable", Fkill_local_variable, Skill_local_variable, 1695 DEFUN ("kill-local-variable", Fkill_local_variable, Skill_local_variable,
1752 1, 1, "vKill Local Variable: ", 1696 1, 1, "vKill Local Variable: ",
1753 doc: /* Make VARIABLE no longer have a separate value in the current buffer. 1697 doc: /* Make VARIABLE no longer have a separate value in the current buffer.
1754 From now on the default value will apply in this buffer. Return VARIABLE. */) 1698 From now on the default value will apply in this buffer. Return VARIABLE. */)
1755 (variable) 1699 (register Lisp_Object variable)
1756 register Lisp_Object variable;
1757 { 1700 {
1758 register Lisp_Object tem; 1701 register Lisp_Object tem;
1759 struct Lisp_Buffer_Local_Value *blv; 1702 struct Lisp_Buffer_Local_Value *blv;
1760 struct Lisp_Symbol *sym; 1703 struct Lisp_Symbol *sym;
1761 1704
1839 `modify-frame-parameters' for how to set frame parameters. 1782 `modify-frame-parameters' for how to set frame parameters.
1840 1783
1841 Note that since Emacs 23.1, variables cannot be both buffer-local and 1784 Note that since Emacs 23.1, variables cannot be both buffer-local and
1842 frame-local any more (buffer-local bindings used to take precedence over 1785 frame-local any more (buffer-local bindings used to take precedence over
1843 frame-local bindings). */) 1786 frame-local bindings). */)
1844 (variable) 1787 (register Lisp_Object variable)
1845 register Lisp_Object variable;
1846 { 1788 {
1847 int forwarded; 1789 int forwarded;
1848 union Lisp_Val_Fwd valcontents; 1790 union Lisp_Val_Fwd valcontents;
1849 struct Lisp_Symbol *sym; 1791 struct Lisp_Symbol *sym;
1850 struct Lisp_Buffer_Local_Value *blv = NULL; 1792 struct Lisp_Buffer_Local_Value *blv = NULL;
1895 1837
1896 DEFUN ("local-variable-p", Flocal_variable_p, Slocal_variable_p, 1838 DEFUN ("local-variable-p", Flocal_variable_p, Slocal_variable_p,
1897 1, 2, 0, 1839 1, 2, 0,
1898 doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER. 1840 doc: /* Non-nil if VARIABLE has a local binding in buffer BUFFER.
1899 BUFFER defaults to the current buffer. */) 1841 BUFFER defaults to the current buffer. */)
1900 (variable, buffer) 1842 (register Lisp_Object variable, Lisp_Object buffer)
1901 register Lisp_Object variable, buffer;
1902 { 1843 {
1903 register struct buffer *buf; 1844 register struct buffer *buf;
1904 struct Lisp_Symbol *sym; 1845 struct Lisp_Symbol *sym;
1905 1846
1906 if (NILP (buffer)) 1847 if (NILP (buffer))
1960 More precisely, this means that setting the variable \(with `set' or`setq'), 1901 More precisely, this means that setting the variable \(with `set' or`setq'),
1961 while it does not have a `let'-style binding that was made in BUFFER, 1902 while it does not have a `let'-style binding that was made in BUFFER,
1962 will produce a buffer local binding. See Info node 1903 will produce a buffer local binding. See Info node
1963 `(elisp)Creating Buffer-Local'. 1904 `(elisp)Creating Buffer-Local'.
1964 BUFFER defaults to the current buffer. */) 1905 BUFFER defaults to the current buffer. */)
1965 (variable, buffer) 1906 (register Lisp_Object variable, Lisp_Object buffer)
1966 register Lisp_Object variable, buffer;
1967 { 1907 {
1968 struct Lisp_Symbol *sym; 1908 struct Lisp_Symbol *sym;
1969 1909
1970 CHECK_SYMBOL (variable); 1910 CHECK_SYMBOL (variable);
1971 sym = XSYMBOL (variable); 1911 sym = XSYMBOL (variable);
1994 1, 1, 0, 1934 1, 1, 0,
1995 doc: /* Return a value indicating where VARIABLE's current binding comes from. 1935 doc: /* Return a value indicating where VARIABLE's current binding comes from.
1996 If the current binding is buffer-local, the value is the current buffer. 1936 If the current binding is buffer-local, the value is the current buffer.
1997 If the current binding is frame-local, the value is the selected frame. 1937 If the current binding is frame-local, the value is the selected frame.
1998 If the current binding is global (the default), the value is nil. */) 1938 If the current binding is global (the default), the value is nil. */)
1999 (variable) 1939 (register Lisp_Object variable)
2000 register Lisp_Object variable;
2001 { 1940 {
2002 struct Lisp_Symbol *sym; 1941 struct Lisp_Symbol *sym;
2003 1942
2004 CHECK_SYMBOL (variable); 1943 CHECK_SYMBOL (variable);
2005 sym = XSYMBOL (variable); 1944 sym = XSYMBOL (variable);
2045 If SYMBOL is not a terminal-local variable, then return its normal 1984 If SYMBOL is not a terminal-local variable, then return its normal
2046 value, like `symbol-value'. 1985 value, like `symbol-value'.
2047 1986
2048 TERMINAL may be a terminal object, a frame, or nil (meaning the 1987 TERMINAL may be a terminal object, a frame, or nil (meaning the
2049 selected frame's terminal device). */) 1988 selected frame's terminal device). */)
2050 (symbol, terminal) 1989 (Lisp_Object symbol, Lisp_Object terminal)
2051 Lisp_Object symbol;
2052 Lisp_Object terminal;
2053 { 1990 {
2054 Lisp_Object result; 1991 Lisp_Object result;
2055 struct terminal *t = get_terminal (terminal, 1); 1992 struct terminal *t = get_terminal (terminal, 1);
2056 push_kboard (t->kboard); 1993 push_kboard (t->kboard);
2057 result = Fsymbol_value (symbol); 1994 result = Fsymbol_value (symbol);
2064 If VARIABLE is not a terminal-local variable, then set its normal 2001 If VARIABLE is not a terminal-local variable, then set its normal
2065 binding, like `set'. 2002 binding, like `set'.
2066 2003
2067 TERMINAL may be a terminal object, a frame, or nil (meaning the 2004 TERMINAL may be a terminal object, a frame, or nil (meaning the
2068 selected frame's terminal device). */) 2005 selected frame's terminal device). */)
2069 (symbol, terminal, value) 2006 (Lisp_Object symbol, Lisp_Object terminal, Lisp_Object value)
2070 Lisp_Object symbol;
2071 Lisp_Object terminal;
2072 Lisp_Object value;
2073 { 2007 {
2074 Lisp_Object result; 2008 Lisp_Object result;
2075 struct terminal *t = get_terminal (terminal, 1); 2009 struct terminal *t = get_terminal (terminal, 1);
2076 push_kboard (d->kboard); 2010 push_kboard (d->kboard);
2077 result = Fset (symbol, value); 2011 result = Fset (symbol, value);
2120 function indirections to find the final function binding and return it. 2054 function indirections to find the final function binding and return it.
2121 If the final symbol in the chain is unbound, signal a void-function error. 2055 If the final symbol in the chain is unbound, signal a void-function error.
2122 Optional arg NOERROR non-nil means to return nil instead of signalling. 2056 Optional arg NOERROR non-nil means to return nil instead of signalling.
2123 Signal a cyclic-function-indirection error if there is a loop in the 2057 Signal a cyclic-function-indirection error if there is a loop in the
2124 function chain of symbols. */) 2058 function chain of symbols. */)
2125 (object, noerror) 2059 (register Lisp_Object object, Lisp_Object noerror)
2126 register Lisp_Object object;
2127 Lisp_Object noerror;
2128 { 2060 {
2129 Lisp_Object result; 2061 Lisp_Object result;
2130 2062
2131 /* Optimize for no indirection. */ 2063 /* Optimize for no indirection. */
2132 result = object; 2064 result = object;
2146 2078
2147 DEFUN ("aref", Faref, Saref, 2, 2, 0, 2079 DEFUN ("aref", Faref, Saref, 2, 2, 0,
2148 doc: /* Return the element of ARRAY at index IDX. 2080 doc: /* Return the element of ARRAY at index IDX.
2149 ARRAY may be a vector, a string, a char-table, a bool-vector, 2081 ARRAY may be a vector, a string, a char-table, a bool-vector,
2150 or a byte-code object. IDX starts at 0. */) 2082 or a byte-code object. IDX starts at 0. */)
2151 (array, idx) 2083 (register Lisp_Object array, Lisp_Object idx)
2152 register Lisp_Object array;
2153 Lisp_Object idx;
2154 { 2084 {
2155 register int idxval; 2085 register int idxval;
2156 2086
2157 CHECK_NUMBER (idx); 2087 CHECK_NUMBER (idx);
2158 idxval = XINT (idx); 2088 idxval = XINT (idx);
2202 2132
2203 DEFUN ("aset", Faset, Saset, 3, 3, 0, 2133 DEFUN ("aset", Faset, Saset, 3, 3, 0,
2204 doc: /* Store into the element of ARRAY at index IDX the value NEWELT. 2134 doc: /* Store into the element of ARRAY at index IDX the value NEWELT.
2205 Return NEWELT. ARRAY may be a vector, a string, a char-table or a 2135 Return NEWELT. ARRAY may be a vector, a string, a char-table or a
2206 bool-vector. IDX starts at 0. */) 2136 bool-vector. IDX starts at 0. */)
2207 (array, idx, newelt) 2137 (register Lisp_Object array, Lisp_Object idx, Lisp_Object newelt)
2208 register Lisp_Object array;
2209 Lisp_Object idx, newelt;
2210 { 2138 {
2211 register int idxval; 2139 register int idxval;
2212 2140
2213 CHECK_NUMBER (idx); 2141 CHECK_NUMBER (idx);
2214 idxval = XINT (idx); 2142 idxval = XINT (idx);
2358 } 2286 }
2359 } 2287 }
2360 2288
2361 DEFUN ("=", Feqlsign, Seqlsign, 2, 2, 0, 2289 DEFUN ("=", Feqlsign, Seqlsign, 2, 2, 0,
2362 doc: /* Return t if two args, both numbers or markers, are equal. */) 2290 doc: /* Return t if two args, both numbers or markers, are equal. */)
2363 (num1, num2) 2291 (register Lisp_Object num1, Lisp_Object num2)
2364 register Lisp_Object num1, num2;
2365 { 2292 {
2366 return arithcompare (num1, num2, equal); 2293 return arithcompare (num1, num2, equal);
2367 } 2294 }
2368 2295
2369 DEFUN ("<", Flss, Slss, 2, 2, 0, 2296 DEFUN ("<", Flss, Slss, 2, 2, 0,
2370 doc: /* Return t if first arg is less than second arg. Both must be numbers or markers. */) 2297 doc: /* Return t if first arg is less than second arg. Both must be numbers or markers. */)
2371 (num1, num2) 2298 (register Lisp_Object num1, Lisp_Object num2)
2372 register Lisp_Object num1, num2;
2373 { 2299 {
2374 return arithcompare (num1, num2, less); 2300 return arithcompare (num1, num2, less);
2375 } 2301 }
2376 2302
2377 DEFUN (">", Fgtr, Sgtr, 2, 2, 0, 2303 DEFUN (">", Fgtr, Sgtr, 2, 2, 0,
2378 doc: /* Return t if first arg is greater than second arg. Both must be numbers or markers. */) 2304 doc: /* Return t if first arg is greater than second arg. Both must be numbers or markers. */)
2379 (num1, num2) 2305 (register Lisp_Object num1, Lisp_Object num2)
2380 register Lisp_Object num1, num2;
2381 { 2306 {
2382 return arithcompare (num1, num2, grtr); 2307 return arithcompare (num1, num2, grtr);
2383 } 2308 }
2384 2309
2385 DEFUN ("<=", Fleq, Sleq, 2, 2, 0, 2310 DEFUN ("<=", Fleq, Sleq, 2, 2, 0,
2386 doc: /* Return t if first arg is less than or equal to second arg. 2311 doc: /* Return t if first arg is less than or equal to second arg.
2387 Both must be numbers or markers. */) 2312 Both must be numbers or markers. */)
2388 (num1, num2) 2313 (register Lisp_Object num1, Lisp_Object num2)
2389 register Lisp_Object num1, num2;
2390 { 2314 {
2391 return arithcompare (num1, num2, less_or_equal); 2315 return arithcompare (num1, num2, less_or_equal);
2392 } 2316 }
2393 2317
2394 DEFUN (">=", Fgeq, Sgeq, 2, 2, 0, 2318 DEFUN (">=", Fgeq, Sgeq, 2, 2, 0,
2395 doc: /* Return t if first arg is greater than or equal to second arg. 2319 doc: /* Return t if first arg is greater than or equal to second arg.
2396 Both must be numbers or markers. */) 2320 Both must be numbers or markers. */)
2397 (num1, num2) 2321 (register Lisp_Object num1, Lisp_Object num2)
2398 register Lisp_Object num1, num2;
2399 { 2322 {
2400 return arithcompare (num1, num2, grtr_or_equal); 2323 return arithcompare (num1, num2, grtr_or_equal);
2401 } 2324 }
2402 2325
2403 DEFUN ("/=", Fneq, Sneq, 2, 2, 0, 2326 DEFUN ("/=", Fneq, Sneq, 2, 2, 0,
2404 doc: /* Return t if first arg is not equal to second arg. Both must be numbers or markers. */) 2327 doc: /* Return t if first arg is not equal to second arg. Both must be numbers or markers. */)
2405 (num1, num2) 2328 (register Lisp_Object num1, Lisp_Object num2)
2406 register Lisp_Object num1, num2;
2407 { 2329 {
2408 return arithcompare (num1, num2, notequal); 2330 return arithcompare (num1, num2, notequal);
2409 } 2331 }
2410 2332
2411 DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, 2333 DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0,
2412 doc: /* Return t if NUMBER is zero. */) 2334 doc: /* Return t if NUMBER is zero. */)
2413 (number) 2335 (register Lisp_Object number)
2414 register Lisp_Object number;
2415 { 2336 {
2416 CHECK_NUMBER_OR_FLOAT (number); 2337 CHECK_NUMBER_OR_FLOAT (number);
2417 2338
2418 if (FLOATP (number)) 2339 if (FLOATP (number))
2419 { 2340 {
2458 2379
2459 DEFUN ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0, 2380 DEFUN ("number-to-string", Fnumber_to_string, Snumber_to_string, 1, 1, 0,
2460 doc: /* Return the decimal representation of NUMBER as a string. 2381 doc: /* Return the decimal representation of NUMBER as a string.
2461 Uses a minus sign if negative. 2382 Uses a minus sign if negative.
2462 NUMBER may be an integer or a floating point number. */) 2383 NUMBER may be an integer or a floating point number. */)
2463 (number) 2384 (Lisp_Object number)
2464 Lisp_Object number;
2465 { 2385 {
2466 char buffer[VALBITS]; 2386 char buffer[VALBITS];
2467 2387
2468 CHECK_NUMBER_OR_FLOAT (number); 2388 CHECK_NUMBER_OR_FLOAT (number);
2469 2389
2510 It ignores leading spaces and tabs, and all trailing chars. 2430 It ignores leading spaces and tabs, and all trailing chars.
2511 2431
2512 If BASE, interpret STRING as a number in that base. If BASE isn't 2432 If BASE, interpret STRING as a number in that base. If BASE isn't
2513 present, base 10 is used. BASE must be between 2 and 16 (inclusive). 2433 present, base 10 is used. BASE must be between 2 and 16 (inclusive).
2514 If the base used is not 10, STRING is always parsed as integer. */) 2434 If the base used is not 10, STRING is always parsed as integer. */)
2515 (string, base) 2435 (register Lisp_Object string, Lisp_Object base)
2516 register Lisp_Object string, base;
2517 { 2436 {
2518 register unsigned char *p; 2437 register unsigned char *p;
2519 register int b; 2438 register int b;
2520 int sign = 1; 2439 int sign = 1;
2521 Lisp_Object val; 2440 Lisp_Object val;
2730 2649
2731 2650
2732 DEFUN ("+", Fplus, Splus, 0, MANY, 0, 2651 DEFUN ("+", Fplus, Splus, 0, MANY, 0,
2733 doc: /* Return sum of any number of arguments, which are numbers or markers. 2652 doc: /* Return sum of any number of arguments, which are numbers or markers.
2734 usage: (+ &rest NUMBERS-OR-MARKERS) */) 2653 usage: (+ &rest NUMBERS-OR-MARKERS) */)
2735 (nargs, args) 2654 (int nargs, Lisp_Object *args)
2736 int nargs;
2737 Lisp_Object *args;
2738 { 2655 {
2739 return arith_driver (Aadd, nargs, args); 2656 return arith_driver (Aadd, nargs, args);
2740 } 2657 }
2741 2658
2742 DEFUN ("-", Fminus, Sminus, 0, MANY, 0, 2659 DEFUN ("-", Fminus, Sminus, 0, MANY, 0,
2743 doc: /* Negate number or subtract numbers or markers and return the result. 2660 doc: /* Negate number or subtract numbers or markers and return the result.
2744 With one arg, negates it. With more than one arg, 2661 With one arg, negates it. With more than one arg,
2745 subtracts all but the first from the first. 2662 subtracts all but the first from the first.
2746 usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */) 2663 usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS) */)
2747 (nargs, args) 2664 (int nargs, Lisp_Object *args)
2748 int nargs;
2749 Lisp_Object *args;
2750 { 2665 {
2751 return arith_driver (Asub, nargs, args); 2666 return arith_driver (Asub, nargs, args);
2752 } 2667 }
2753 2668
2754 DEFUN ("*", Ftimes, Stimes, 0, MANY, 0, 2669 DEFUN ("*", Ftimes, Stimes, 0, MANY, 0,
2755 doc: /* Return product of any number of arguments, which are numbers or markers. 2670 doc: /* Return product of any number of arguments, which are numbers or markers.
2756 usage: (* &rest NUMBERS-OR-MARKERS) */) 2671 usage: (* &rest NUMBERS-OR-MARKERS) */)
2757 (nargs, args) 2672 (int nargs, Lisp_Object *args)
2758 int nargs;
2759 Lisp_Object *args;
2760 { 2673 {
2761 return arith_driver (Amult, nargs, args); 2674 return arith_driver (Amult, nargs, args);
2762 } 2675 }
2763 2676
2764 DEFUN ("/", Fquo, Squo, 2, MANY, 0, 2677 DEFUN ("/", Fquo, Squo, 2, MANY, 0,
2765 doc: /* Return first argument divided by all the remaining arguments. 2678 doc: /* Return first argument divided by all the remaining arguments.
2766 The arguments must be numbers or markers. 2679 The arguments must be numbers or markers.
2767 usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */) 2680 usage: (/ DIVIDEND DIVISOR &rest DIVISORS) */)
2768 (nargs, args) 2681 (int nargs, Lisp_Object *args)
2769 int nargs;
2770 Lisp_Object *args;
2771 { 2682 {
2772 int argnum; 2683 int argnum;
2773 for (argnum = 2; argnum < nargs; argnum++) 2684 for (argnum = 2; argnum < nargs; argnum++)
2774 if (FLOATP (args[argnum])) 2685 if (FLOATP (args[argnum]))
2775 return float_arith_driver (0, 0, Adiv, nargs, args); 2686 return float_arith_driver (0, 0, Adiv, nargs, args);
2777 } 2688 }
2778 2689
2779 DEFUN ("%", Frem, Srem, 2, 2, 0, 2690 DEFUN ("%", Frem, Srem, 2, 2, 0,
2780 doc: /* Return remainder of X divided by Y. 2691 doc: /* Return remainder of X divided by Y.
2781 Both must be integers or markers. */) 2692 Both must be integers or markers. */)
2782 (x, y) 2693 (register Lisp_Object x, Lisp_Object y)
2783 register Lisp_Object x, y;
2784 { 2694 {
2785 Lisp_Object val; 2695 Lisp_Object val;
2786 2696
2787 CHECK_NUMBER_COERCE_MARKER (x); 2697 CHECK_NUMBER_COERCE_MARKER (x);
2788 CHECK_NUMBER_COERCE_MARKER (y); 2698 CHECK_NUMBER_COERCE_MARKER (y);
2819 2729
2820 DEFUN ("mod", Fmod, Smod, 2, 2, 0, 2730 DEFUN ("mod", Fmod, Smod, 2, 2, 0,
2821 doc: /* Return X modulo Y. 2731 doc: /* Return X modulo Y.
2822 The result falls between zero (inclusive) and Y (exclusive). 2732 The result falls between zero (inclusive) and Y (exclusive).
2823 Both X and Y must be numbers or markers. */) 2733 Both X and Y must be numbers or markers. */)
2824 (x, y) 2734 (register Lisp_Object x, Lisp_Object y)
2825 register Lisp_Object x, y;
2826 { 2735 {
2827 Lisp_Object val; 2736 Lisp_Object val;
2828 EMACS_INT i1, i2; 2737 EMACS_INT i1, i2;
2829 2738
2830 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (x); 2739 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (x);
2851 2760
2852 DEFUN ("max", Fmax, Smax, 1, MANY, 0, 2761 DEFUN ("max", Fmax, Smax, 1, MANY, 0,
2853 doc: /* Return largest of all the arguments (which must be numbers or markers). 2762 doc: /* Return largest of all the arguments (which must be numbers or markers).
2854 The value is always a number; markers are converted to numbers. 2763 The value is always a number; markers are converted to numbers.
2855 usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) 2764 usage: (max NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */)
2856 (nargs, args) 2765 (int nargs, Lisp_Object *args)
2857 int nargs;
2858 Lisp_Object *args;
2859 { 2766 {
2860 return arith_driver (Amax, nargs, args); 2767 return arith_driver (Amax, nargs, args);
2861 } 2768 }
2862 2769
2863 DEFUN ("min", Fmin, Smin, 1, MANY, 0, 2770 DEFUN ("min", Fmin, Smin, 1, MANY, 0,
2864 doc: /* Return smallest of all the arguments (which must be numbers or markers). 2771 doc: /* Return smallest of all the arguments (which must be numbers or markers).
2865 The value is always a number; markers are converted to numbers. 2772 The value is always a number; markers are converted to numbers.
2866 usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */) 2773 usage: (min NUMBER-OR-MARKER &rest NUMBERS-OR-MARKERS) */)
2867 (nargs, args) 2774 (int nargs, Lisp_Object *args)
2868 int nargs;
2869 Lisp_Object *args;
2870 { 2775 {
2871 return arith_driver (Amin, nargs, args); 2776 return arith_driver (Amin, nargs, args);
2872 } 2777 }
2873 2778
2874 DEFUN ("logand", Flogand, Slogand, 0, MANY, 0, 2779 DEFUN ("logand", Flogand, Slogand, 0, MANY, 0,
2875 doc: /* Return bitwise-and of all the arguments. 2780 doc: /* Return bitwise-and of all the arguments.
2876 Arguments may be integers, or markers converted to integers. 2781 Arguments may be integers, or markers converted to integers.
2877 usage: (logand &rest INTS-OR-MARKERS) */) 2782 usage: (logand &rest INTS-OR-MARKERS) */)
2878 (nargs, args) 2783 (int nargs, Lisp_Object *args)
2879 int nargs;
2880 Lisp_Object *args;
2881 { 2784 {
2882 return arith_driver (Alogand, nargs, args); 2785 return arith_driver (Alogand, nargs, args);
2883 } 2786 }
2884 2787
2885 DEFUN ("logior", Flogior, Slogior, 0, MANY, 0, 2788 DEFUN ("logior", Flogior, Slogior, 0, MANY, 0,
2886 doc: /* Return bitwise-or of all the arguments. 2789 doc: /* Return bitwise-or of all the arguments.
2887 Arguments may be integers, or markers converted to integers. 2790 Arguments may be integers, or markers converted to integers.
2888 usage: (logior &rest INTS-OR-MARKERS) */) 2791 usage: (logior &rest INTS-OR-MARKERS) */)
2889 (nargs, args) 2792 (int nargs, Lisp_Object *args)
2890 int nargs;
2891 Lisp_Object *args;
2892 { 2793 {
2893 return arith_driver (Alogior, nargs, args); 2794 return arith_driver (Alogior, nargs, args);
2894 } 2795 }
2895 2796
2896 DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0, 2797 DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0,
2897 doc: /* Return bitwise-exclusive-or of all the arguments. 2798 doc: /* Return bitwise-exclusive-or of all the arguments.
2898 Arguments may be integers, or markers converted to integers. 2799 Arguments may be integers, or markers converted to integers.
2899 usage: (logxor &rest INTS-OR-MARKERS) */) 2800 usage: (logxor &rest INTS-OR-MARKERS) */)
2900 (nargs, args) 2801 (int nargs, Lisp_Object *args)
2901 int nargs;
2902 Lisp_Object *args;
2903 { 2802 {
2904 return arith_driver (Alogxor, nargs, args); 2803 return arith_driver (Alogxor, nargs, args);
2905 } 2804 }
2906 2805
2907 DEFUN ("ash", Fash, Sash, 2, 2, 0, 2806 DEFUN ("ash", Fash, Sash, 2, 2, 0,
2908 doc: /* Return VALUE with its bits shifted left by COUNT. 2807 doc: /* Return VALUE with its bits shifted left by COUNT.
2909 If COUNT is negative, shifting is actually to the right. 2808 If COUNT is negative, shifting is actually to the right.
2910 In this case, the sign bit is duplicated. */) 2809 In this case, the sign bit is duplicated. */)
2911 (value, count) 2810 (register Lisp_Object value, Lisp_Object count)
2912 register Lisp_Object value, count;
2913 { 2811 {
2914 register Lisp_Object val; 2812 register Lisp_Object val;
2915 2813
2916 CHECK_NUMBER (value); 2814 CHECK_NUMBER (value);
2917 CHECK_NUMBER (count); 2815 CHECK_NUMBER (count);
2929 2827
2930 DEFUN ("lsh", Flsh, Slsh, 2, 2, 0, 2828 DEFUN ("lsh", Flsh, Slsh, 2, 2, 0,
2931 doc: /* Return VALUE with its bits shifted left by COUNT. 2829 doc: /* Return VALUE with its bits shifted left by COUNT.
2932 If COUNT is negative, shifting is actually to the right. 2830 If COUNT is negative, shifting is actually to the right.
2933 In this case, zeros are shifted in on the left. */) 2831 In this case, zeros are shifted in on the left. */)
2934 (value, count) 2832 (register Lisp_Object value, Lisp_Object count)
2935 register Lisp_Object value, count;
2936 { 2833 {
2937 register Lisp_Object val; 2834 register Lisp_Object val;
2938 2835
2939 CHECK_NUMBER (value); 2836 CHECK_NUMBER (value);
2940 CHECK_NUMBER (count); 2837 CHECK_NUMBER (count);
2951 } 2848 }
2952 2849
2953 DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0, 2850 DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0,
2954 doc: /* Return NUMBER plus one. NUMBER may be a number or a marker. 2851 doc: /* Return NUMBER plus one. NUMBER may be a number or a marker.
2955 Markers are converted to integers. */) 2852 Markers are converted to integers. */)
2956 (number) 2853 (register Lisp_Object number)
2957 register Lisp_Object number;
2958 { 2854 {
2959 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); 2855 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number);
2960 2856
2961 if (FLOATP (number)) 2857 if (FLOATP (number))
2962 return (make_float (1.0 + XFLOAT_DATA (number))); 2858 return (make_float (1.0 + XFLOAT_DATA (number)));
2966 } 2862 }
2967 2863
2968 DEFUN ("1-", Fsub1, Ssub1, 1, 1, 0, 2864 DEFUN ("1-", Fsub1, Ssub1, 1, 1, 0,
2969 doc: /* Return NUMBER minus one. NUMBER may be a number or a marker. 2865 doc: /* Return NUMBER minus one. NUMBER may be a number or a marker.
2970 Markers are converted to integers. */) 2866 Markers are converted to integers. */)
2971 (number) 2867 (register Lisp_Object number)
2972 register Lisp_Object number;
2973 { 2868 {
2974 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number); 2869 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number);
2975 2870
2976 if (FLOATP (number)) 2871 if (FLOATP (number))
2977 return (make_float (-1.0 + XFLOAT_DATA (number))); 2872 return (make_float (-1.0 + XFLOAT_DATA (number)));
2980 return number; 2875 return number;
2981 } 2876 }
2982 2877
2983 DEFUN ("lognot", Flognot, Slognot, 1, 1, 0, 2878 DEFUN ("lognot", Flognot, Slognot, 1, 1, 0,
2984 doc: /* Return the bitwise complement of NUMBER. NUMBER must be an integer. */) 2879 doc: /* Return the bitwise complement of NUMBER. NUMBER must be an integer. */)
2985 (number) 2880 (register Lisp_Object number)
2986 register Lisp_Object number;
2987 { 2881 {
2988 CHECK_NUMBER (number); 2882 CHECK_NUMBER (number);
2989 XSETINT (number, ~XINT (number)); 2883 XSETINT (number, ~XINT (number));
2990 return number; 2884 return number;
2991 } 2885 }
2992 2886
2993 DEFUN ("byteorder", Fbyteorder, Sbyteorder, 0, 0, 0, 2887 DEFUN ("byteorder", Fbyteorder, Sbyteorder, 0, 0, 0,
2994 doc: /* Return the byteorder for the machine. 2888 doc: /* Return the byteorder for the machine.
2995 Returns 66 (ASCII uppercase B) for big endian machines or 108 (ASCII 2889 Returns 66 (ASCII uppercase B) for big endian machines or 108 (ASCII
2996 lowercase l) for small endian machines. */) 2890 lowercase l) for small endian machines. */)
2997 () 2891 (void)
2998 { 2892 {
2999 unsigned i = 0x04030201; 2893 unsigned i = 0x04030201;
3000 int order = *(char *)&i == 1 ? 108 : 66; 2894 int order = *(char *)&i == 1 ? 108 : 66;
3001 2895
3002 return make_number (order); 2896 return make_number (order);