mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-13 10:20:59 -07:00
Replace remaining uses of Qwrong_type_argument
For discussion, see: https://lists.gnu.org/r/emacs-devel/2026-03/msg00306.html * src/comp.c (helper_GET_SYMBOL_WITH_POSITION): Use symbol-with-pos-p, not wrong-type-argument, in the wrong-type-argument error predicate slot. * src/data.c (Fbare_symbol): * src/print.c (print_bind_overrides): * src/treesit.c (Ftreesit_parser_create, treesit_resolve_node): Prefer wrong_type_argument over xsignal2.
This commit is contained in:
parent
10bac4d9e5
commit
d1079cced2
4 changed files with 10 additions and 11 deletions
|
|
@ -4976,8 +4976,7 @@ helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum pvec_type code)
|
|||
static struct Lisp_Symbol_With_Pos *
|
||||
helper_GET_SYMBOL_WITH_POSITION (Lisp_Object a)
|
||||
{
|
||||
if (!SYMBOL_WITH_POS_P (a))
|
||||
wrong_type_argument (Qwrong_type_argument, a);
|
||||
CHECK_TYPE (SYMBOL_WITH_POS_P (a), Qsymbol_with_pos_p, a);
|
||||
return XUNTAG (a, Lisp_Vectorlike, struct Lisp_Symbol_With_Pos);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -841,7 +841,7 @@ This function ignores `symbols-with-pos-enabled'. */)
|
|||
return sym;
|
||||
if (SYMBOL_WITH_POS_P (sym))
|
||||
return XSYMBOL_WITH_POS_SYM (sym);
|
||||
xsignal2 (Qwrong_type_argument, list2 (Qsymbolp, Qsymbol_with_pos_p), sym);
|
||||
wrong_type_argument (list2 (Qsymbolp, Qsymbol_with_pos_p), sym);
|
||||
}
|
||||
|
||||
DEFUN ("symbol-with-pos-pos", Fsymbol_with_pos_pos, Ssymbol_with_pos_pos, 1, 1, 0,
|
||||
|
|
|
|||
|
|
@ -708,7 +708,7 @@ print_bind_overrides (Lisp_Object overrides)
|
|||
if (EQ (overrides, Qt))
|
||||
print_bind_all_defaults ();
|
||||
else if (!CONSP (overrides))
|
||||
xsignal2 (Qwrong_type_argument, Qconsp, overrides);
|
||||
wrong_type_argument (Qconsp, overrides);
|
||||
else
|
||||
{
|
||||
while (!NILP (overrides))
|
||||
|
|
@ -717,19 +717,19 @@ print_bind_overrides (Lisp_Object overrides)
|
|||
if (EQ (setting, Qt))
|
||||
print_bind_all_defaults ();
|
||||
else if (!CONSP (setting))
|
||||
xsignal2 (Qwrong_type_argument, Qconsp, setting);
|
||||
wrong_type_argument (Qconsp, setting);
|
||||
else
|
||||
{
|
||||
Lisp_Object key = XCAR (setting),
|
||||
value = XCDR (setting);
|
||||
Lisp_Object map = Fassq (key, Vprint_variable_mapping);
|
||||
if (NILP (map))
|
||||
xsignal2 (Qwrong_type_argument, Qsymbolp, map);
|
||||
wrong_type_argument (Qsymbolp, map);
|
||||
specbind (XCAR (XCDR (map)), value);
|
||||
}
|
||||
|
||||
if (!NILP (XCDR (overrides)) && !CONSP (XCDR (overrides)))
|
||||
xsignal2 (Qwrong_type_argument, Qconsp, overrides);
|
||||
wrong_type_argument (Qconsp, overrides);
|
||||
overrides = XCDR (overrides);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2364,7 +2364,7 @@ an indirect buffer. */)
|
|||
buf = buf->base_buffer;
|
||||
|
||||
if (EQ (tag, Qt))
|
||||
xsignal2(Qwrong_type_argument, list2(Qnot, Qt), Qt);
|
||||
wrong_type_argument (list2 (Qnot, Qt), Qt);
|
||||
|
||||
treesit_check_buffer_size (buf);
|
||||
|
||||
|
|
@ -3914,9 +3914,9 @@ static Lisp_Object treesit_resolve_node (Lisp_Object obj)
|
|||
return Ftreesit_parser_root_node (parser);
|
||||
}
|
||||
else
|
||||
xsignal2 (Qwrong_type_argument,
|
||||
list4 (Qor, Qtreesit_node_p, Qtreesit_parser_p, Qsymbolp),
|
||||
obj);
|
||||
wrong_type_argument (list4 (Qor, Qtreesit_node_p,
|
||||
Qtreesit_parser_p, Qsymbolp),
|
||||
obj);
|
||||
}
|
||||
|
||||
/* Create and initialize QUERY. When success, initialize TS_QUERY,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue