mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
* feature.c (s_scm_add_hook_x): Call scm_wrong_type_arg instead of
scm_misc_error when add-hook! is passed a procedure of wring arity. (Thanks to Greg Harvey.)
This commit is contained in:
parent
15b08ebd0d
commit
1834aa1ba2
1 changed files with 1 additions and 3 deletions
|
@ -235,9 +235,7 @@ GUILE_PROC (scm_add_hook_x, "add-hook!", 2, 1, 0,
|
|||
|| (SCM_FALSEP (SCM_CADDR (arity))
|
||||
&& (SCM_INUM (SCM_CAR (arity)) + SCM_INUM (SCM_CADR (arity))
|
||||
< n_args)))
|
||||
scm_misc_error (FUNC_NAME,
|
||||
"This hook requires %s arguments",
|
||||
SCM_LIST1 (SCM_MAKINUM (SCM_HOOK_ARITY (hook))));
|
||||
scm_wrong_type_arg (FUNC_NAME, 2, proc);
|
||||
rest = scm_delq_x (proc, SCM_HOOK_PROCEDURES (hook));
|
||||
SCM_SET_HOOK_PROCEDURES (hook,
|
||||
(!SCM_UNBNDP (append_p) && SCM_NFALSEP (append_p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue