diff options
| author | Richard M. Stallman | 1995-11-10 06:34:09 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-11-10 06:34:09 +0000 |
| commit | 8450690adc64e9e5b0662e32676a6342a1fdd0f0 (patch) | |
| tree | cbc5267aa89148924ceba1202342b3e68f165d6e /src | |
| parent | acac2700ecbcd911deeb571522c0ec7b7ca9d9bb (diff) | |
| download | emacs-8450690adc64e9e5b0662e32676a6342a1fdd0f0.tar.gz emacs-8450690adc64e9e5b0662e32676a6342a1fdd0f0.zip | |
(syms_of_callint): Set up Qlet, Qletx, Qsave_excursion.
(Fcall_interactively): Look past those special forms
when checking for a call to `list'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/callint.c | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/src/callint.c b/src/callint.c index 7519d42521d..231de94c3f0 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -41,7 +41,7 @@ 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. */ |
| @@ -302,22 +302,36 @@ Otherwise, this is done only if an arg is read using the minibuffer.") | |||
| 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 | } |
| @@ -696,6 +710,12 @@ syms_of_callint () | |||
| 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); |