aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Love2003-01-10 12:49:38 +0000
committerDave Love2003-01-10 12:49:38 +0000
commit4abc7470be618162b965f45ca02825303931015f (patch)
tree312bd5516360f06da68577ce15c450095f22b9ee /src
parent8e9e520bd503dc3594070feedeb19ed6cea4610f (diff)
downloademacs-4abc7470be618162b965f45ca02825303931015f.tar.gz
emacs-4abc7470be618162b965f45ca02825303931015f.zip
(syms_of_composite): Make composition_hash_table
weak.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/composite.c18
2 files changed, 14 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7a15b6c73fa..66f295b0932 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12003-01-10 Dave Love <fx@gnu.org>
2
3 * composite.c (syms_of_composite): Make composition_hash_table
4 weak.
5
12003-01-09 Kim F. Storm <storm@cua.dk> 62003-01-09 Kim F. Storm <storm@cua.dk>
2 7
3 * process.c (Fmake_network_process): Convert new port number 8 * process.c (Fmake_network_process): Convert new port number
diff --git a/src/composite.c b/src/composite.c
index 56acce6d1ce..7bd50a23396 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -92,32 +92,32 @@ Boston, MA 02111-1307, USA. */
92 92
93 The former is a hash table in which keys are COMPONENTS-VECs and 93 The former is a hash table in which keys are COMPONENTS-VECs and
94 values are the corresponding COMPOSITION-IDs. This hash table is 94 values are the corresponding COMPOSITION-IDs. This hash table is
95 weak, but as each key (COMPONENTS-VEC) is also kept as a value of 95 weak, but as each key (COMPONENTS-VEC) is also kept as a value of the
96 `composition' property, it won't be collected as garbage until all 96 `composition' property, it won't be collected as garbage until all
97 text that have the same COMPONENTS-VEC are deleted. 97 bits of text that have the same COMPONENTS-VEC are deleted.
98 98
99 The latter is a table of pointers to `struct composition' indexed 99 The latter is a table of pointers to `struct composition' indexed
100 by COMPOSITION-ID. This structure keep the other information (see 100 by COMPOSITION-ID. This structure keeps the other information (see
101 composite.h). 101 composite.h).
102 102
103 In general, a text property holds information about individual 103 In general, a text property holds information about individual
104 characters. But, a `composition' property holds information about 104 characters. But, a `composition' property holds information about
105 a sequence of characters (in this sense, it is like `intangible' 105 a sequence of characters (in this sense, it is like the `intangible'
106 property). That means that we should not share the property value 106 property). That means that we should not share the property value
107 in adjacent compositions we can't distinguish them if they have the 107 in adjacent compositions -- we can't distinguish them if they have the
108 same property. So, after any changes, we call 108 same property. So, after any changes, we call
109 `update_compositions' and change a property of one of adjacent 109 `update_compositions' and change a property of one of adjacent
110 compositions to a copy of it. This function also runs a proper 110 compositions to a copy of it. This function also runs a proper
111 composition modification function to make a composition that gets 111 composition modification function to make a composition that gets
112 invalid by the change valid again. 112 invalid by the change valid again.
113 113
114 As a value of `composition' property holds information about a 114 As the value of the `composition' property holds information about a
115 specific range of text, the value gets invalid if we change the 115 specific range of text, the value gets invalid if we change the
116 text in the range. We treat `composition' property always 116 text in the range. We treat the `composition' property as always
117 rear-nonsticky (currently by setting default-text-properties to 117 rear-nonsticky (currently by setting default-text-properties to
118 (rear-nonsticky (composition))) and we never make properties of 118 (rear-nonsticky (composition))) and we never make properties of
119 adjacent compositions identical. Thus, any such changes make the 119 adjacent compositions identical. Thus, any such changes make the
120 range just shorter. So, we can check the validity of `composition' 120 range just shorter. So, we can check the validity of the `composition'
121 property by comparing LENGTH information with the actual length of 121 property by comparing LENGTH information with the actual length of
122 the composition. 122 the composition.
123 123
@@ -843,7 +843,7 @@ syms_of_composite ()
843 args[0] = QCtest; 843 args[0] = QCtest;
844 args[1] = Qequal; 844 args[1] = Qequal;
845 args[2] = QCweakness; 845 args[2] = QCweakness;
846 args[3] = Qnil; 846 args[3] = Qt;
847 args[4] = QCsize; 847 args[4] = QCsize;
848 args[5] = make_number (311); 848 args[5] = make_number (311);
849 composition_hash_table = Fmake_hash_table (6, args); 849 composition_hash_table = Fmake_hash_table (6, args);