Mercurial > emacs
comparison src/callint.c @ 25645:a14111a2a100
Use XCAR, XCDR, XFLOAT_DATA instead of explicit member access.
author | Ken Raeburn <raeburn@raeburn.org> |
---|---|
date | Sun, 12 Sep 1999 05:07:01 +0000 |
parents | f477c5bb74c6 |
children | d39ec0a27081 |
comparison
equal
deleted
inserted
replaced
25644:2ae0f7963ccc | 25645:a14111a2a100 |
---|---|
312 look for elements that were computed with (region-beginning) | 312 look for elements that were computed with (region-beginning) |
313 or (region-end), and put those expressions into VALUES | 313 or (region-end), and put those expressions into VALUES |
314 instead of the present values. */ | 314 instead of the present values. */ |
315 if (CONSP (input)) | 315 if (CONSP (input)) |
316 { | 316 { |
317 car = XCONS (input)->car; | 317 car = XCAR (input); |
318 /* Skip through certain special forms. */ | 318 /* Skip through certain special forms. */ |
319 while (EQ (car, Qlet) || EQ (car, Qletx) | 319 while (EQ (car, Qlet) || EQ (car, Qletx) |
320 || EQ (car, Qsave_excursion)) | 320 || EQ (car, Qsave_excursion)) |
321 { | 321 { |
322 while (CONSP (XCONS (input)->cdr)) | 322 while (CONSP (XCDR (input))) |
323 input = XCONS (input)->cdr; | 323 input = XCDR (input); |
324 input = XCONS (input)->car; | 324 input = XCAR (input); |
325 if (!CONSP (input)) | 325 if (!CONSP (input)) |
326 break; | 326 break; |
327 car = XCONS (input)->car; | 327 car = XCAR (input); |
328 } | 328 } |
329 if (EQ (car, Qlist)) | 329 if (EQ (car, Qlist)) |
330 { | 330 { |
331 Lisp_Object intail, valtail; | 331 Lisp_Object intail, valtail; |
332 for (intail = Fcdr (input), valtail = values; | 332 for (intail = Fcdr (input), valtail = values; |
351 /* Don't keep command history around forever. */ | 351 /* Don't keep command history around forever. */ |
352 if (NUMBERP (Vhistory_length) && XINT (Vhistory_length) > 0) | 352 if (NUMBERP (Vhistory_length) && XINT (Vhistory_length) > 0) |
353 { | 353 { |
354 teml = Fnthcdr (Vhistory_length, Vcommand_history); | 354 teml = Fnthcdr (Vhistory_length, Vcommand_history); |
355 if (CONSP (teml)) | 355 if (CONSP (teml)) |
356 XCONS (teml)->cdr = Qnil; | 356 XCDR (teml) = Qnil; |
357 } | 357 } |
358 } | 358 } |
359 single_kboard_state (); | 359 single_kboard_state (); |
360 return apply1 (function, specs); | 360 return apply1 (function, specs); |
361 } | 361 } |
386 { | 386 { |
387 Lisp_Object event; | 387 Lisp_Object event; |
388 | 388 |
389 event = XVECTOR (keys)->contents[next_event]; | 389 event = XVECTOR (keys)->contents[next_event]; |
390 if (EVENT_HAS_PARAMETERS (event) | 390 if (EVENT_HAS_PARAMETERS (event) |
391 && (event = XCONS (event)->cdr, CONSP (event)) | 391 && (event = XCDR (event), CONSP (event)) |
392 && (event = XCONS (event)->car, CONSP (event)) | 392 && (event = XCAR (event), CONSP (event)) |
393 && (event = XCONS (event)->car, WINDOWP (event))) | 393 && (event = XCAR (event), WINDOWP (event))) |
394 { | 394 { |
395 if (MINI_WINDOW_P (XWINDOW (event)) | 395 if (MINI_WINDOW_P (XWINDOW (event)) |
396 && ! (minibuf_level > 0 && EQ (event, minibuf_window))) | 396 && ! (minibuf_level > 0 && EQ (event, minibuf_window))) |
397 error ("Attempt to select inactive minibuffer window"); | 397 error ("Attempt to select inactive minibuffer window"); |
398 | 398 |
552 | 552 |
553 /* If the key sequence ends with a down-event, | 553 /* If the key sequence ends with a down-event, |
554 discard the following up-event. */ | 554 discard the following up-event. */ |
555 teml = Faref (args[i], make_number (XINT (Flength (args[i])) - 1)); | 555 teml = Faref (args[i], make_number (XINT (Flength (args[i])) - 1)); |
556 if (CONSP (teml)) | 556 if (CONSP (teml)) |
557 teml = XCONS (teml)->car; | 557 teml = XCAR (teml); |
558 if (SYMBOLP (teml)) | 558 if (SYMBOLP (teml)) |
559 { | 559 { |
560 Lisp_Object tem2; | 560 Lisp_Object tem2; |
561 | 561 |
562 teml = Fget (teml, intern ("event-symbol-elements")); | 562 teml = Fget (teml, intern ("event-symbol-elements")); |
580 | 580 |
581 /* If the key sequence ends with a down-event, | 581 /* If the key sequence ends with a down-event, |
582 discard the following up-event. */ | 582 discard the following up-event. */ |
583 teml = Faref (args[i], make_number (XINT (Flength (args[i])) - 1)); | 583 teml = Faref (args[i], make_number (XINT (Flength (args[i])) - 1)); |
584 if (CONSP (teml)) | 584 if (CONSP (teml)) |
585 teml = XCONS (teml)->car; | 585 teml = XCAR (teml); |
586 if (SYMBOLP (teml)) | 586 if (SYMBOLP (teml)) |
587 { | 587 { |
588 Lisp_Object tem2; | 588 Lisp_Object tem2; |
589 | 589 |
590 teml = Fget (teml, intern ("event-symbol-elements")); | 590 teml = Fget (teml, intern ("event-symbol-elements")); |
769 /* Don't keep command history around forever. */ | 769 /* Don't keep command history around forever. */ |
770 if (NUMBERP (Vhistory_length) && XINT (Vhistory_length) > 0) | 770 if (NUMBERP (Vhistory_length) && XINT (Vhistory_length) > 0) |
771 { | 771 { |
772 teml = Fnthcdr (Vhistory_length, Vcommand_history); | 772 teml = Fnthcdr (Vhistory_length, Vcommand_history); |
773 if (CONSP (teml)) | 773 if (CONSP (teml)) |
774 XCONS (teml)->cdr = Qnil; | 774 XCDR (teml) = Qnil; |
775 } | 775 } |
776 } | 776 } |
777 | 777 |
778 /* If we used a marker to hold point, mark, or an end of the region, | 778 /* If we used a marker to hold point, mark, or an end of the region, |
779 temporarily, convert it to an integer now. */ | 779 temporarily, convert it to an integer now. */ |
805 | 805 |
806 if (NILP (raw)) | 806 if (NILP (raw)) |
807 XSETFASTINT (val, 1); | 807 XSETFASTINT (val, 1); |
808 else if (EQ (raw, Qminus)) | 808 else if (EQ (raw, Qminus)) |
809 XSETINT (val, -1); | 809 XSETINT (val, -1); |
810 else if (CONSP (raw) && INTEGERP (XCONS (raw)->car)) | 810 else if (CONSP (raw) && INTEGERP (XCAR (raw))) |
811 XSETINT (val, XINT (XCONS (raw)->car)); | 811 XSETINT (val, XINT (XCAR (raw))); |
812 else if (INTEGERP (raw)) | 812 else if (INTEGERP (raw)) |
813 val = raw; | 813 val = raw; |
814 else | 814 else |
815 XSETFASTINT (val, 1); | 815 XSETFASTINT (val, 1); |
816 | 816 |