diff options
| author | Eli Zaretskii | 2017-11-26 20:23:15 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2017-11-26 20:23:15 +0200 |
| commit | 16358d4fcbad3fa60ff36167ae666b1ec7e7c02a (patch) | |
| tree | fe8f563ab7c0bb7e43992e2db7e4ddea857dda1a /src | |
| parent | a89f0b6f33f9eb8910a1fceda9028d76ef50b05d (diff) | |
| download | emacs-16358d4fcbad3fa60ff36167ae666b1ec7e7c02a.tar.gz emacs-16358d4fcbad3fa60ff36167ae666b1ec7e7c02a.zip | |
Improve documentation of "constant" symbols
* src/font.c (syms_of_font) <font-weight-table, font-slant-table>
<font-width-table>:
* src/data.c (syms_of_data) <most-positive-fixnum>
<most-negative-fixnum>:
* src/buffer.c (syms_of_buffer) <enable-multibyte-characters>:
Mention in the doc strings that these variables are read-only.
* doc/lispref/variables.texi (Creating Buffer-Local): Document
that making a constant variable buffer-local signals an error.
* doc/lispref/variables.texi (Constant Variables):
* doc/lispref/errors.texi (Standard Errors): More accurate and
up-to-date documentation of which symbols cannot be assigned
values.
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.c | 2 | ||||
| -rw-r--r-- | src/data.c | 6 | ||||
| -rw-r--r-- | src/font.c | 9 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/buffer.c b/src/buffer.c index 6e3412c3d05..c6f9eb28e25 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -5620,6 +5620,8 @@ file I/O and the behavior of various editing commands. | |||
| 5620 | 5620 | ||
| 5621 | This variable is buffer-local but you cannot set it directly; | 5621 | This variable is buffer-local but you cannot set it directly; |
| 5622 | use the function `set-buffer-multibyte' to change a buffer's representation. | 5622 | use the function `set-buffer-multibyte' to change a buffer's representation. |
| 5623 | To prevent any attempts to set it or make it buffer-local, Emacs will | ||
| 5624 | signal an error in those cases. | ||
| 5623 | See also Info node `(elisp)Text Representations'. */); | 5625 | See also Info node `(elisp)Text Representations'. */); |
| 5624 | make_symbol_constant (intern_c_string ("enable-multibyte-characters")); | 5626 | make_symbol_constant (intern_c_string ("enable-multibyte-characters")); |
| 5625 | 5627 | ||
diff --git a/src/data.c b/src/data.c index b4f6fd5c652..d54c46d72bf 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -3880,12 +3880,14 @@ syms_of_data (void) | |||
| 3880 | set_symbol_function (Qwholenump, XSYMBOL (Qnatnump)->u.s.function); | 3880 | set_symbol_function (Qwholenump, XSYMBOL (Qnatnump)->u.s.function); |
| 3881 | 3881 | ||
| 3882 | DEFVAR_LISP ("most-positive-fixnum", Vmost_positive_fixnum, | 3882 | DEFVAR_LISP ("most-positive-fixnum", Vmost_positive_fixnum, |
| 3883 | doc: /* The largest value that is representable in a Lisp integer. */); | 3883 | doc: /* The largest value that is representable in a Lisp integer. |
| 3884 | This variable cannot be set; trying to do so will signal an error. */); | ||
| 3884 | Vmost_positive_fixnum = make_number (MOST_POSITIVE_FIXNUM); | 3885 | Vmost_positive_fixnum = make_number (MOST_POSITIVE_FIXNUM); |
| 3885 | make_symbol_constant (intern_c_string ("most-positive-fixnum")); | 3886 | make_symbol_constant (intern_c_string ("most-positive-fixnum")); |
| 3886 | 3887 | ||
| 3887 | DEFVAR_LISP ("most-negative-fixnum", Vmost_negative_fixnum, | 3888 | DEFVAR_LISP ("most-negative-fixnum", Vmost_negative_fixnum, |
| 3888 | doc: /* The smallest value that is representable in a Lisp integer. */); | 3889 | doc: /* The smallest value that is representable in a Lisp integer. |
| 3890 | This variable cannot be set; trying to do so will signal an error. */); | ||
| 3889 | Vmost_negative_fixnum = make_number (MOST_NEGATIVE_FIXNUM); | 3891 | Vmost_negative_fixnum = make_number (MOST_NEGATIVE_FIXNUM); |
| 3890 | make_symbol_constant (intern_c_string ("most-negative-fixnum")); | 3892 | make_symbol_constant (intern_c_string ("most-negative-fixnum")); |
| 3891 | 3893 | ||
diff --git a/src/font.c b/src/font.c index 51625b49fa8..f7cebdce78c 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -5421,19 +5421,22 @@ gets the repertory information by an opened font and ENCODING. */); | |||
| 5421 | doc: /* Vector of valid font weight values. | 5421 | doc: /* Vector of valid font weight values. |
| 5422 | Each element has the form: | 5422 | Each element has the form: |
| 5423 | [NUMERIC-VALUE SYMBOLIC-NAME ALIAS-NAME ...] | 5423 | [NUMERIC-VALUE SYMBOLIC-NAME ALIAS-NAME ...] |
| 5424 | NUMERIC-VALUE is an integer, and SYMBOLIC-NAME and ALIAS-NAME are symbols. */); | 5424 | NUMERIC-VALUE is an integer, and SYMBOLIC-NAME and ALIAS-NAME are symbols. |
| 5425 | This variable cannot be set; trying to do so will signal an error. */); | ||
| 5425 | Vfont_weight_table = BUILD_STYLE_TABLE (weight_table); | 5426 | Vfont_weight_table = BUILD_STYLE_TABLE (weight_table); |
| 5426 | make_symbol_constant (intern_c_string ("font-weight-table")); | 5427 | make_symbol_constant (intern_c_string ("font-weight-table")); |
| 5427 | 5428 | ||
| 5428 | DEFVAR_LISP_NOPRO ("font-slant-table", Vfont_slant_table, | 5429 | DEFVAR_LISP_NOPRO ("font-slant-table", Vfont_slant_table, |
| 5429 | doc: /* Vector of font slant symbols vs the corresponding numeric values. | 5430 | doc: /* Vector of font slant symbols vs the corresponding numeric values. |
| 5430 | See `font-weight-table' for the format of the vector. */); | 5431 | See `font-weight-table' for the format of the vector. |
| 5432 | This variable cannot be set; trying to do so will signal an error. */); | ||
| 5431 | Vfont_slant_table = BUILD_STYLE_TABLE (slant_table); | 5433 | Vfont_slant_table = BUILD_STYLE_TABLE (slant_table); |
| 5432 | make_symbol_constant (intern_c_string ("font-slant-table")); | 5434 | make_symbol_constant (intern_c_string ("font-slant-table")); |
| 5433 | 5435 | ||
| 5434 | DEFVAR_LISP_NOPRO ("font-width-table", Vfont_width_table, | 5436 | DEFVAR_LISP_NOPRO ("font-width-table", Vfont_width_table, |
| 5435 | doc: /* Alist of font width symbols vs the corresponding numeric values. | 5437 | doc: /* Alist of font width symbols vs the corresponding numeric values. |
| 5436 | See `font-weight-table' for the format of the vector. */); | 5438 | See `font-weight-table' for the format of the vector. |
| 5439 | This variable cannot be set; trying to do so will signal an error. */); | ||
| 5437 | Vfont_width_table = BUILD_STYLE_TABLE (width_table); | 5440 | Vfont_width_table = BUILD_STYLE_TABLE (width_table); |
| 5438 | make_symbol_constant (intern_c_string ("font-width-table")); | 5441 | make_symbol_constant (intern_c_string ("font-width-table")); |
| 5439 | 5442 | ||