From d1000fb48bb941c5336051f20fe7d46e60260605 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 24 Nov 2017 16:15:09 -0500 Subject: [PATCH] * src/data.c: Fix regression in last clone-buffer change * src/data.c (Fmake_local_variable, Fmake_variable_buffer_local): Signal more precise error when applied to read-only variable. --- src/data.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/data.c b/src/data.c index 4a3afed6f71..7ca1892f64a 100644 --- a/src/data.c +++ b/src/data.c @@ -1852,7 +1852,7 @@ The function `default-value' gets the default value and `set-default' sets it. } if (SYMBOL_CONSTANT_P (variable)) - error ("Symbol %s may not be buffer-local", SDATA (SYMBOL_NAME (variable))); + xsignal1 (Qsetting_constant, variable); if (!blv) { @@ -1915,8 +1915,7 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) } if (sym->u.s.trapped_write == SYMBOL_NOWRITE) - error ("Symbol %s may not be buffer-local", - SDATA (SYMBOL_NAME (variable))); + xsignal1 (Qsetting_constant, variable); if (blv ? blv->local_if_set : (forwarded && BUFFER_OBJFWDP (valcontents.fwd))) -- 2.39.2