From: Stefan Monnier Date: Fri, 24 Nov 2017 21:15:09 +0000 (-0500) Subject: * src/data.c: Fix regression in last clone-buffer change X-Git-Tag: emacs-27.0.90~6129 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d1000fb48bb941c5336051f20fe7d46e60260605;p=emacs.git * 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. --- 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)))