[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99956: * font.c (syms_of_font): Make
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99956: * font.c (syms_of_font): Make the style table vars read-only. |
Date: |
Tue, 20 Apr 2010 13:17:29 -0400 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99956
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2010-04-20 13:17:29 -0400
message:
* font.c (syms_of_font): Make the style table vars read-only.
modified:
src/ChangeLog
src/font.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-04-20 17:01:39 +0000
+++ b/src/ChangeLog 2010-04-20 17:17:29 +0000
@@ -1,5 +1,7 @@
2010-04-20 Stefan Monnier <address@hidden>
+ * font.c (syms_of_font): Make the style table vars read-only.
+
* buffer.h (struct buffer): Remove unused var `direction_reversed'.
* buffer.c (init_buffer_once, syms_of_buffer): Remove its
initialization.
=== modified file 'src/font.c'
--- a/src/font.c 2010-02-27 02:09:03 +0000
+++ b/src/font.c 2010-04-20 17:17:29 +0000
@@ -5376,22 +5376,30 @@
gets the repertory information by an opened font and ENCODING. */);
Vfont_encoding_alist = Qnil;
+ /* FIXME: These 3 vars are not quite what they appear: setq on them
+ won't have any effect other than disconnect them from the style
+ table used by the font display code. So we make them read-only,
+ to avoid this confusing situation. */
+
DEFVAR_LISP_NOPRO ("font-weight-table", &Vfont_weight_table,
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. */);
Vfont_weight_table = BUILD_STYLE_TABLE (weight_table);
+ XSYMBOL (intern_c_string ("font-weight-table"))->constant = 1;
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. */);
Vfont_slant_table = BUILD_STYLE_TABLE (slant_table);
+ XSYMBOL (intern_c_string ("font-slant-table"))->constant = 1;
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. */);
Vfont_width_table = BUILD_STYLE_TABLE (width_table);
+ XSYMBOL (intern_c_string ("font-width-table"))->constant = 1;
staticpro (&font_style_table);
font_style_table = Fmake_vector (make_number (3), Qnil);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99956: * font.c (syms_of_font): Make the style table vars read-only.,
Stefan Monnier <=