diff options
| author | Richard M. Stallman | 1994-03-02 03:46:54 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-03-02 03:46:54 +0000 |
| commit | 9d58218c8209415442d99cdf3a69db96f932b682 (patch) | |
| tree | 0576fbda81aeeedc49000c86b0dea5bbcee88fde /src/eval.c | |
| parent | 22bbbd42aaf68793c71269ec5efc9fff072c757d (diff) | |
| download | emacs-9d58218c8209415442d99cdf3a69db96f932b682.tar.gz emacs-9d58218c8209415442d99cdf3a69db96f932b682.zip | |
(Fsignal): If DATA is memory_signal_data, don't add to it.
(Fsignal): Record the clause in chosen_clause.
(Fcondition_case, internal_condition_case): Look there.
(internal_condition_case_1): Look there.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/eval.c b/src/eval.c index 9e5a33d9775..02590e6e938 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1034,8 +1034,8 @@ See also the function `signal' for more info.") | |||
| 1034 | if (_setjmp (c.jmp)) | 1034 | if (_setjmp (c.jmp)) |
| 1035 | { | 1035 | { |
| 1036 | if (!NILP (h.var)) | 1036 | if (!NILP (h.var)) |
| 1037 | specbind (h.var, Fcdr (c.val)); | 1037 | specbind (h.var, c.val); |
| 1038 | val = Fprogn (Fcdr (Fcar (c.val))); | 1038 | val = Fprogn (Fcdr (h.chosen_clause)); |
| 1039 | 1039 | ||
| 1040 | /* Note that this just undoes the binding of h.var; whoever | 1040 | /* Note that this just undoes the binding of h.var; whoever |
| 1041 | longjumped to us unwound the stack to c.pdlcount before | 1041 | longjumped to us unwound the stack to c.pdlcount before |
| @@ -1078,7 +1078,7 @@ internal_condition_case (bfun, handlers, hfun) | |||
| 1078 | c.gcpro = gcprolist; | 1078 | c.gcpro = gcprolist; |
| 1079 | if (_setjmp (c.jmp)) | 1079 | if (_setjmp (c.jmp)) |
| 1080 | { | 1080 | { |
| 1081 | return (*hfun) (Fcdr (c.val)); | 1081 | return (*hfun) (c.val); |
| 1082 | } | 1082 | } |
| 1083 | c.next = catchlist; | 1083 | c.next = catchlist; |
| 1084 | catchlist = &c; | 1084 | catchlist = &c; |
| @@ -1115,7 +1115,7 @@ internal_condition_case_1 (bfun, arg, handlers, hfun) | |||
| 1115 | c.gcpro = gcprolist; | 1115 | c.gcpro = gcprolist; |
| 1116 | if (_setjmp (c.jmp)) | 1116 | if (_setjmp (c.jmp)) |
| 1117 | { | 1117 | { |
| 1118 | return (*hfun) (Fcdr (c.val)); | 1118 | return (*hfun) (c.val); |
| 1119 | } | 1119 | } |
| 1120 | c.next = catchlist; | 1120 | c.next = catchlist; |
| 1121 | catchlist = &c; | 1121 | catchlist = &c; |
| @@ -1190,9 +1190,16 @@ See also the function `condition-case'.") | |||
| 1190 | 1190 | ||
| 1191 | if (!NILP (clause)) | 1191 | if (!NILP (clause)) |
| 1192 | { | 1192 | { |
| 1193 | Lisp_Object unwind_data; | ||
| 1193 | struct handler *h = handlerlist; | 1194 | struct handler *h = handlerlist; |
| 1195 | |||
| 1194 | handlerlist = allhandlers; | 1196 | handlerlist = allhandlers; |
| 1195 | unwind_to_catch (h->tag, Fcons (clause, Fcons (error_symbol, data))); | 1197 | if (data == memory_signal_data) |
| 1198 | unwind_data = memory_signal_data; | ||
| 1199 | else | ||
| 1200 | unwind_data = Fcons (error_symbol, data); | ||
| 1201 | h->chosen_clause = clause; | ||
| 1202 | unwind_to_catch (h->tag, unwind_data); | ||
| 1196 | } | 1203 | } |
| 1197 | } | 1204 | } |
| 1198 | 1205 | ||