diff options
| author | Stefan Monnier | 2010-04-20 13:17:29 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2010-04-20 13:17:29 -0400 |
| commit | 933ac235bd586814f0ac49aac4f385083c1dd5a8 (patch) | |
| tree | 6283ef29a1c901c0fcafd07dc48431f76c846827 /src | |
| parent | b4bf28b732a4d8d4deaa18f1bc7e2078b8febeec (diff) | |
| download | emacs-933ac235bd586814f0ac49aac4f385083c1dd5a8.tar.gz emacs-933ac235bd586814f0ac49aac4f385083c1dd5a8.zip | |
* font.c (syms_of_font): Make the style table vars read-only.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/font.c | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2ff8e87dc70..a5954d29dd3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2010-04-20 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2010-04-20 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * font.c (syms_of_font): Make the style table vars read-only. | ||
| 4 | |||
| 3 | * buffer.h (struct buffer): Remove unused var `direction_reversed'. | 5 | * buffer.h (struct buffer): Remove unused var `direction_reversed'. |
| 4 | * buffer.c (init_buffer_once, syms_of_buffer): Remove its initialization. | 6 | * buffer.c (init_buffer_once, syms_of_buffer): Remove its initialization. |
| 5 | 7 | ||
diff --git a/src/font.c b/src/font.c index 765712198fe..2d55065e9c8 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -5376,22 +5376,30 @@ non-nil value in the table are supported. If REPERTORY is nil, Emacs | |||
| 5376 | gets the repertory information by an opened font and ENCODING. */); | 5376 | gets the repertory information by an opened font and ENCODING. */); |
| 5377 | Vfont_encoding_alist = Qnil; | 5377 | Vfont_encoding_alist = Qnil; |
| 5378 | 5378 | ||
| 5379 | /* FIXME: These 3 vars are not quite what they appear: setq on them | ||
| 5380 | won't have any effect other than disconnect them from the style | ||
| 5381 | table used by the font display code. So we make them read-only, | ||
| 5382 | to avoid this confusing situation. */ | ||
| 5383 | |||
| 5379 | DEFVAR_LISP_NOPRO ("font-weight-table", &Vfont_weight_table, | 5384 | DEFVAR_LISP_NOPRO ("font-weight-table", &Vfont_weight_table, |
| 5380 | doc: /* Vector of valid font weight values. | 5385 | doc: /* Vector of valid font weight values. |
| 5381 | Each element has the form: | 5386 | Each element has the form: |
| 5382 | [NUMERIC-VALUE SYMBOLIC-NAME ALIAS-NAME ...] | 5387 | [NUMERIC-VALUE SYMBOLIC-NAME ALIAS-NAME ...] |
| 5383 | NUMERIC-VALUE is an integer, and SYMBOLIC-NAME and ALIAS-NAME are symbols. */); | 5388 | NUMERIC-VALUE is an integer, and SYMBOLIC-NAME and ALIAS-NAME are symbols. */); |
| 5384 | Vfont_weight_table = BUILD_STYLE_TABLE (weight_table); | 5389 | Vfont_weight_table = BUILD_STYLE_TABLE (weight_table); |
| 5390 | XSYMBOL (intern_c_string ("font-weight-table"))->constant = 1; | ||
| 5385 | 5391 | ||
| 5386 | DEFVAR_LISP_NOPRO ("font-slant-table", &Vfont_slant_table, | 5392 | DEFVAR_LISP_NOPRO ("font-slant-table", &Vfont_slant_table, |
| 5387 | doc: /* Vector of font slant symbols vs the corresponding numeric values. | 5393 | doc: /* Vector of font slant symbols vs the corresponding numeric values. |
| 5388 | See `font-weight-table' for the format of the vector. */); | 5394 | See `font-weight-table' for the format of the vector. */); |
| 5389 | Vfont_slant_table = BUILD_STYLE_TABLE (slant_table); | 5395 | Vfont_slant_table = BUILD_STYLE_TABLE (slant_table); |
| 5396 | XSYMBOL (intern_c_string ("font-slant-table"))->constant = 1; | ||
| 5390 | 5397 | ||
| 5391 | DEFVAR_LISP_NOPRO ("font-width-table", &Vfont_width_table, | 5398 | DEFVAR_LISP_NOPRO ("font-width-table", &Vfont_width_table, |
| 5392 | doc: /* Alist of font width symbols vs the corresponding numeric values. | 5399 | doc: /* Alist of font width symbols vs the corresponding numeric values. |
| 5393 | See `font-weight-table' for the format of the vector. */); | 5400 | See `font-weight-table' for the format of the vector. */); |
| 5394 | Vfont_width_table = BUILD_STYLE_TABLE (width_table); | 5401 | Vfont_width_table = BUILD_STYLE_TABLE (width_table); |
| 5402 | XSYMBOL (intern_c_string ("font-width-table"))->constant = 1; | ||
| 5395 | 5403 | ||
| 5396 | staticpro (&font_style_table); | 5404 | staticpro (&font_style_table); |
| 5397 | font_style_table = Fmake_vector (make_number (3), Qnil); | 5405 | font_style_table = Fmake_vector (make_number (3), Qnil); |