@item setting-constant
The message is @samp{Attempt to set a constant symbol}. This happens
-when attempting to assign values to @code{nil}, @code{t}, and keyword
-symbols. @xref{Constant Variables}.
+when attempting to assign values to @code{nil}, @code{t},
+@code{most-positive-fixnum}, @code{most-negative-fixnum}, and keyword
+symbols. It also happens when attempting to assign values to
+@code{enable-multibyte-characters} and some other symbols whose direct
+assignment is not allowed for some reason. @xref{Constant Variables}.
@c simple.el
@item text-read-only
that you do not intend to change the value of a variable, but Emacs
does not raise an error if you actually change it.
+@cindex read-only variables
+A small number of additional symbols are made read-only for various
+practical reasons. These include @code{enable-multibyte-characters},
+@code{most-positive-fixnum}, @code{most-negative-fixnum}, and a few
+others. Any attempt to set or bind these also signals a
+@code{setting-constant} error.
+
@node Local Variables
@section Local Variables
@cindex binding local variables
because @code{let} does not distinguish between different kinds of
bindings; it knows only which variable the binding was made for.
+It is an error to make a constant or a read-only variable
+buffer-local. @xref{Constant Variables}.
+
If the variable is terminal-local (@pxref{Multiple Terminals}), this
function signals an error. Such variables cannot have buffer-local
bindings as well.
The value returned is @var{variable}.
+It is an error to make a constant or a read-only variable
+buffer-local. @xref{Constant Variables}.
+
@strong{Warning:} Don't assume that you should use
@code{make-variable-buffer-local} for user-option variables, simply
because users @emph{might} want to customize them differently in
This variable is buffer-local but you cannot set it directly;
use the function `set-buffer-multibyte' to change a buffer's representation.
+To prevent any attempts to set it or make it buffer-local, Emacs will
+signal an error in those cases.
See also Info node `(elisp)Text Representations'. */);
make_symbol_constant (intern_c_string ("enable-multibyte-characters"));
set_symbol_function (Qwholenump, XSYMBOL (Qnatnump)->u.s.function);
DEFVAR_LISP ("most-positive-fixnum", Vmost_positive_fixnum,
- doc: /* The largest value that is representable in a Lisp integer. */);
+ doc: /* The largest value that is representable in a Lisp integer.
+This variable cannot be set; trying to do so will signal an error. */);
Vmost_positive_fixnum = make_number (MOST_POSITIVE_FIXNUM);
make_symbol_constant (intern_c_string ("most-positive-fixnum"));
DEFVAR_LISP ("most-negative-fixnum", Vmost_negative_fixnum,
- doc: /* The smallest value that is representable in a Lisp integer. */);
+ doc: /* The smallest value that is representable in a Lisp integer.
+This variable cannot be set; trying to do so will signal an error. */);
Vmost_negative_fixnum = make_number (MOST_NEGATIVE_FIXNUM);
make_symbol_constant (intern_c_string ("most-negative-fixnum"));
doc: /* Vector of valid font weight values.
Each element has the form:
[NUMERIC-VALUE SYMBOLIC-NAME ALIAS-NAME ...]
-NUMERIC-VALUE is an integer, and SYMBOLIC-NAME and ALIAS-NAME are symbols. */);
+NUMERIC-VALUE is an integer, and SYMBOLIC-NAME and ALIAS-NAME are symbols.
+This variable cannot be set; trying to do so will signal an error. */);
Vfont_weight_table = BUILD_STYLE_TABLE (weight_table);
make_symbol_constant (intern_c_string ("font-weight-table"));
DEFVAR_LISP_NOPRO ("font-slant-table", Vfont_slant_table,
doc: /* Vector of font slant symbols vs the corresponding numeric values.
-See `font-weight-table' for the format of the vector. */);
+See `font-weight-table' for the format of the vector.
+This variable cannot be set; trying to do so will signal an error. */);
Vfont_slant_table = BUILD_STYLE_TABLE (slant_table);
make_symbol_constant (intern_c_string ("font-slant-table"));
DEFVAR_LISP_NOPRO ("font-width-table", Vfont_width_table,
doc: /* Alist of font width symbols vs the corresponding numeric values.
-See `font-weight-table' for the format of the vector. */);
+See `font-weight-table' for the format of the vector.
+This variable cannot be set; trying to do so will signal an error. */);
Vfont_width_table = BUILD_STYLE_TABLE (width_table);
make_symbol_constant (intern_c_string ("font-width-table"));