diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/composite.c | 22 |
2 files changed, 16 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 82ec420a182..5c4600d3809 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2003-01-10 Dave Love <fx@gnu.org> | ||
| 2 | |||
| 3 | * composite.c (syms_of_composite): Make composition_hash_table | ||
| 4 | weak. | ||
| 5 | |||
| 1 | 2003-01-10 Kenichi Handa <handa@m17n.org> | 6 | 2003-01-10 Kenichi Handa <handa@m17n.org> |
| 2 | 7 | ||
| 3 | * dispextern.h (check_face_attributes, generate_ascii_font_name) | 8 | * dispextern.h (check_face_attributes, generate_ascii_font_name) |
diff --git a/src/composite.c b/src/composite.c index ebd1c3e3dda..de4ed7335aa 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -95,32 +95,32 @@ Boston, MA 02111-1307, USA. */ | |||
| 95 | 95 | ||
| 96 | The former is a hash table in which keys are COMPONENTS-VECs and | 96 | The former is a hash table in which keys are COMPONENTS-VECs and |
| 97 | values are the corresponding COMPOSITION-IDs. This hash table is | 97 | values are the corresponding COMPOSITION-IDs. This hash table is |
| 98 | weak, but as each key (COMPONENTS-VEC) is also kept as a value of | 98 | weak, but as each key (COMPONENTS-VEC) is also kept as a value of the |
| 99 | `composition' property, it won't be collected as garbage until all | 99 | `composition' property, it won't be collected as garbage until all |
| 100 | text that have the same COMPONENTS-VEC are deleted. | 100 | bits of text that have the same COMPONENTS-VEC are deleted. |
| 101 | 101 | ||
| 102 | The latter is a table of pointers to `struct composition' indexed | 102 | The latter is a table of pointers to `struct composition' indexed |
| 103 | by COMPOSITION-ID. This structure keep the other information (see | 103 | by COMPOSITION-ID. This structure keeps the other information (see |
| 104 | composite.h). | 104 | composite.h). |
| 105 | 105 | ||
| 106 | In general, a text property holds information about individual | 106 | In general, a text property holds information about individual |
| 107 | characters. But, a `composition' property holds information about | 107 | characters. But, a `composition' property holds information about |
| 108 | a sequence of characters (in this sense, it is like `intangible' | 108 | a sequence of characters (in this sense, it is like the `intangible' |
| 109 | property). That means that we should not share the property value | 109 | property). That means that we should not share the property value |
| 110 | in adjacent compositions we can't distinguish them if they have the | 110 | in adjacent compositions -- we can't distinguish them if they have the |
| 111 | same property. So, after any changes, we call | 111 | same property. So, after any changes, we call |
| 112 | `update_compositions' and change a property of one of adjacent | 112 | `update_compositions' and change a property of one of adjacent |
| 113 | compositions to a copy of it. This function also runs a proper | 113 | compositions to a copy of it. This function also runs a proper |
| 114 | composition modification function to make a composition that gets | 114 | composition modification function to make a composition that gets |
| 115 | invalid by the change valid again. | 115 | invalid by the change valid again. |
| 116 | 116 | ||
| 117 | As a value of `composition' property holds information about a | 117 | As the value of the `composition' property holds information about a |
| 118 | specific range of text, the value gets invalid if we change the | 118 | specific range of text, the value gets invalid if we change the |
| 119 | text in the range. We treat `composition' property always | 119 | text in the range. We treat the `composition' property as always |
| 120 | rear-nonsticky (currently by setting default-text-properties to | 120 | rear-nonsticky (currently by setting default-text-properties to |
| 121 | (rear-nonsticky (composition))) and we never make properties of | 121 | (rear-nonsticky (composition))) and we never make properties of |
| 122 | adjacent compositions identical. Thus, any such changes make the | 122 | adjacent compositions identical. Thus, any such changes make the |
| 123 | range just shorter. So, we can check the validity of `composition' | 123 | range just shorter. So, we can check the validity of the `composition' |
| 124 | property by comparing LENGTH information with the actual length of | 124 | property by comparing LENGTH information with the actual length of |
| 125 | the composition. | 125 | the composition. |
| 126 | 126 | ||
| @@ -467,7 +467,7 @@ run_composition_function (from, to, prop) | |||
| 467 | CHECK_MASK is bitwise `or' of mask bits defined by macros | 467 | CHECK_MASK is bitwise `or' of mask bits defined by macros |
| 468 | CHECK_XXX (see the comment in composite.h). | 468 | CHECK_XXX (see the comment in composite.h). |
| 469 | 469 | ||
| 470 | It also reset the text-property `auto-composed' on a proper region | 470 | It also resets the text-property `auto-composed' to a proper region |
| 471 | so that automatic character composition works correctly later while | 471 | so that automatic character composition works correctly later while |
| 472 | displaying the region. | 472 | displaying the region. |
| 473 | 473 | ||
| @@ -616,7 +616,7 @@ DEFUN ("compose-region-internal", Fcompose_region_internal, | |||
| 616 | 616 | ||
| 617 | Compose text in the region between START and END. | 617 | Compose text in the region between START and END. |
| 618 | Optional 3rd and 4th arguments are COMPONENTS and MODIFICATION-FUNC | 618 | Optional 3rd and 4th arguments are COMPONENTS and MODIFICATION-FUNC |
| 619 | for the composition. See `compose-region' for more detial. */) | 619 | for the composition. See `compose-region' for more detail. */) |
| 620 | (start, end, components, mod_func) | 620 | (start, end, components, mod_func) |
| 621 | Lisp_Object start, end, components, mod_func; | 621 | Lisp_Object start, end, components, mod_func; |
| 622 | { | 622 | { |
| @@ -637,7 +637,7 @@ DEFUN ("compose-string-internal", Fcompose_string_internal, | |||
| 637 | 637 | ||
| 638 | Compose text between indices START and END of STRING. | 638 | Compose text between indices START and END of STRING. |
| 639 | Optional 4th and 5th arguments are COMPONENTS and MODIFICATION-FUNC | 639 | Optional 4th and 5th arguments are COMPONENTS and MODIFICATION-FUNC |
| 640 | for the composition. See `compose-string' for more detial. */) | 640 | for the composition. See `compose-string' for more detail. */) |
| 641 | (string, start, end, components, mod_func) | 641 | (string, start, end, components, mod_func) |
| 642 | Lisp_Object string, start, end, components, mod_func; | 642 | Lisp_Object string, start, end, components, mod_func; |
| 643 | { | 643 | { |