Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
5f96776a
Commit
5f96776a
authored
Jan 11, 1994
by
Richard M. Stallman
Browse files
(Fcondition_case): Allow a list of condition names in a handler.
(find_handler_clause): Likewise.
parent
2abcddce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
8 deletions
+27
-8
src/eval.c
src/eval.c
+27
-8
No files found.
src/eval.c
View file @
5f96776a
...
...
@@ -1013,8 +1013,10 @@ See also the function `signal' for more info.")
{
Lisp_Object
tem
;
tem
=
Fcar
(
val
);
if
((
!
NILP
(
tem
))
&&
(
!
CONSP
(
tem
)
||
(
XTYPE
(
XCONS
(
tem
)
->
car
)
!=
Lisp_Symbol
)))
if
(
!
(
NILP
(
tem
)
||
(
CONSP
(
tem
)
&&
(
SYMBOLP
(
XCONS
(
tem
)
->
car
)
||
CONSP
(
XCONS
(
tem
)
->
car
)))))
error
(
"Invalid condition handler"
,
tem
);
}
...
...
@@ -1195,7 +1197,6 @@ find_handler_clause (handlers, conditions, sig, data, debugger_value_ptr)
{
register
Lisp_Object
h
;
register
Lisp_Object
tem
;
register
Lisp_Object
tem1
;
if
(
EQ
(
handlers
,
Qt
))
/* t is used by handlers for all conditions, set up by C code. */
return
Qt
;
...
...
@@ -1220,12 +1221,30 @@ find_handler_clause (handlers, conditions, sig, data, debugger_value_ptr)
}
for
(
h
=
handlers
;
CONSP
(
h
);
h
=
Fcdr
(
h
))
{
tem1
=
Fcar
(
h
);
if
(
!
CONSP
(
tem1
))
Lisp_Object
handler
,
condit
;
handler
=
Fcar
(
h
);
if
(
!
CONSP
(
handler
))
continue
;
tem
=
Fmemq
(
Fcar
(
tem1
),
conditions
);
if
(
!
NILP
(
tem
))
return
tem1
;
condit
=
Fcar
(
handler
);
/* Handle a single condition name in handler HANDLER. */
if
(
SYMBOLP
(
condit
))
{
tem
=
Fmemq
(
Fcar
(
handler
),
conditions
);
if
(
!
NILP
(
tem
))
return
handler
;
}
/* Handle a list of condition names in handler HANDLER. */
else
if
(
CONSP
(
condit
))
{
while
(
CONSP
(
condit
))
{
tem
=
Fmemq
(
Fcar
(
condit
),
conditions
);
if
(
!
NILP
(
tem
))
return
handler
;
condit
=
XCONS
(
condit
)
->
cdr
;
}
}
}
return
Qnil
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment