Mercurial > emacs
comparison src/callint.c @ 13447:8c89b569cfa9
(syms_of_callint): Set up Qlet, Qletx, Qsave_excursion.
(Fcall_interactively): Look past those special forms
when checking for a call to `list'.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 10 Nov 1995 06:34:09 +0000 |
parents | 99457b67e20c |
children | dfbef4de96f0 |
comparison
equal
deleted
inserted
replaced
13446:005d7ed9d69b | 13447:8c89b569cfa9 |
---|---|
39 even if mark_active is 0. */ | 39 even if mark_active is 0. */ |
40 Lisp_Object Vmark_even_if_inactive; | 40 Lisp_Object Vmark_even_if_inactive; |
41 | 41 |
42 Lisp_Object Vmouse_leave_buffer_hook, Qmouse_leave_buffer_hook; | 42 Lisp_Object Vmouse_leave_buffer_hook, Qmouse_leave_buffer_hook; |
43 | 43 |
44 Lisp_Object Qlist; | 44 Lisp_Object Qlist, Qlet, Qletx, Qsave_excursion; |
45 static Lisp_Object preserved_fns; | 45 static Lisp_Object preserved_fns; |
46 | 46 |
47 /* Marker used within call-interactively to refer to point. */ | 47 /* Marker used within call-interactively to refer to point. */ |
48 static Lisp_Object point_marker; | 48 static Lisp_Object point_marker; |
49 | 49 |
300 values = quotify_args (Fcopy_sequence (specs)); | 300 values = quotify_args (Fcopy_sequence (specs)); |
301 /* If the list of args was produced with an explicit call to `list', | 301 /* If the list of args was produced with an explicit call to `list', |
302 look for elements that were computed with (region-beginning) | 302 look for elements that were computed with (region-beginning) |
303 or (region-end), and put those expressions into VALUES | 303 or (region-end), and put those expressions into VALUES |
304 instead of the present values. */ | 304 instead of the present values. */ |
305 car = Fcar (input); | 305 if (CONSP (input)) |
306 if (EQ (car, Qlist)) | |
307 { | 306 { |
308 Lisp_Object intail, valtail; | 307 car = XCONS (input)->car; |
309 for (intail = Fcdr (input), valtail = values; | 308 /* Skip through certain special forms. */ |
310 CONSP (valtail); | 309 while (EQ (car, Qlet) || EQ (car, Qletx) |
311 intail = Fcdr (intail), valtail = Fcdr (valtail)) | 310 || EQ (car, Qsave_excursion)) |
312 { | 311 { |
313 Lisp_Object elt; | 312 while (CONSP (XCONS (input)->cdr)) |
314 elt = Fcar (intail); | 313 input = XCONS (input)->cdr; |
315 if (CONSP (elt)) | 314 input = XCONS (input)->car; |
315 if (!CONSP (input)) | |
316 break; | |
317 car = XCONS (input)->car; | |
318 } | |
319 if (EQ (car, Qlist)) | |
320 { | |
321 Lisp_Object intail, valtail; | |
322 for (intail = Fcdr (input), valtail = values; | |
323 CONSP (valtail); | |
324 intail = Fcdr (intail), valtail = Fcdr (valtail)) | |
316 { | 325 { |
317 Lisp_Object presflag; | 326 Lisp_Object elt; |
318 presflag = Fmemq (Fcar (elt), preserved_fns); | 327 elt = Fcar (intail); |
319 if (!NILP (presflag)) | 328 if (CONSP (elt)) |
320 Fsetcar (valtail, Fcar (intail)); | 329 { |
330 Lisp_Object presflag; | |
331 presflag = Fmemq (Fcar (elt), preserved_fns); | |
332 if (!NILP (presflag)) | |
333 Fsetcar (valtail, Fcar (intail)); | |
334 } | |
321 } | 335 } |
322 } | 336 } |
323 } | 337 } |
324 Vcommand_history | 338 Vcommand_history |
325 = Fcons (Fcons (function, values), Vcommand_history); | 339 = Fcons (Fcons (function, values), Vcommand_history); |
694 Fcons (intern ("mark"), Qnil)))); | 708 Fcons (intern ("mark"), Qnil)))); |
695 staticpro (&preserved_fns); | 709 staticpro (&preserved_fns); |
696 | 710 |
697 Qlist = intern ("list"); | 711 Qlist = intern ("list"); |
698 staticpro (&Qlist); | 712 staticpro (&Qlist); |
713 Qlet = intern ("let"); | |
714 staticpro (&Qlet); | |
715 Qletx = intern ("let*"); | |
716 staticpro (&Qletx); | |
717 Qsave_excursion = intern ("save-excursion"); | |
718 staticpro (&Qsave_excursion); | |
699 | 719 |
700 Qminus = intern ("-"); | 720 Qminus = intern ("-"); |
701 staticpro (&Qminus); | 721 staticpro (&Qminus); |
702 | 722 |
703 Qplus = intern ("+"); | 723 Qplus = intern ("+"); |