src/data.c (set_internal): Mention var which can't be unbound in error msg

This commit is contained in:
Stefan Monnier
2026-04-08 15:43:56 -04:00
parent d8c9a86063
commit 24ff3398c8

View File

@@ -1724,7 +1724,8 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where,
if (unbinding_p && blv->fwd)
/* Forbid unbinding built-in variables. */
error ("Built-in variables may not be unbound");
error ("Built-in variable may not be unbound : %s",
SDATA (SYMBOL_NAME (symbol)));
if (NILP (where))
XSETBUFFER (where, current_buffer);
@@ -1803,7 +1804,8 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where,
if (unbinding_p)
/* Forbid unbinding built-in variables. */
error ("Built-in variables may not be unbound");
error ("Built-in variable may not be unbound : %s",
SDATA (SYMBOL_NAME (symbol)));
if (BUFFER_OBJFWDP (innercontents))
{