aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2012-02-02 18:07:29 +0900
committerKenichi Handa2012-02-02 18:07:29 +0900
commitc5d3843c34587a1584b5ebcf3a693cbfe74bb5c3 (patch)
tree55ddf541f7aa7d1c2341f3317ee6b3e9ef6bf4e3
parent159462d4d179b280c6e68775bbf0630c3317c486 (diff)
downloademacs-c5d3843c34587a1584b5ebcf3a693cbfe74bb5c3.tar.gz
emacs-c5d3843c34587a1584b5ebcf3a693cbfe74bb5c3.zip
Fix previous change for Bug#6988.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/composite.el10
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c6
4 files changed, 13 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ce373a42e7c..6c89f4e528d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12012-02-02 Kenichi Handa <handa@m17n.org> 12012-02-02 Kenichi Handa <handa@m17n.org>
2 2
3 * (compose-region): Cancel previous change.
4
52012-02-02 Kenichi Handa <handa@m17n.org>
6
3 * composite.el (compose-region, compose-string): Signal error for 7 * composite.el (compose-region, compose-string): Signal error for
4 a null string component (Bug#6988). 8 a null string component (Bug#6988).
5 9
diff --git a/lisp/composite.el b/lisp/composite.el
index 739ec8bbcbd..72317ac470e 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -211,7 +211,7 @@ or a vector or list of integers and rules.
211If it is a character, it is an alternate character to display instead 211If it is a character, it is an alternate character to display instead
212of the text in the region. 212of the text in the region.
213 213
214If it is a string, the elements are one or more alternate characters. In 214If it is a string, the elements are alternate characters. In
215this case, TAB element has a special meaning. If the first 215this case, TAB element has a special meaning. If the first
216character is TAB, the glyphs are displayed with left padding space 216character is TAB, the glyphs are displayed with left padding space
217so that no pixel overlaps with the previous column. If the last 217so that no pixel overlaps with the previous column. If the last
@@ -234,9 +234,7 @@ text in the composition."
234 (let ((modified-p (buffer-modified-p)) 234 (let ((modified-p (buffer-modified-p))
235 (inhibit-read-only t)) 235 (inhibit-read-only t))
236 (if (or (vectorp components) (listp components)) 236 (if (or (vectorp components) (listp components))
237 (setq components (encode-composition-components components)) 237 (setq components (encode-composition-components components)))
238 (if (= (length components) 0)
239 (error "Invalid composition component: %s" components)))
240 (compose-region-internal start end components modification-func) 238 (compose-region-internal start end components modification-func)
241 (restore-buffer-modified-p modified-p))) 239 (restore-buffer-modified-p modified-p)))
242 240
@@ -269,9 +267,7 @@ Optional 5th argument MODIFICATION-FUNC is a function to call to
269adjust the composition when it gets invalid because of a change of 267adjust the composition when it gets invalid because of a change of
270text in the composition." 268text in the composition."
271 (if (or (vectorp components) (listp components)) 269 (if (or (vectorp components) (listp components))
272 (setq components (encode-composition-components components)) 270 (setq components (encode-composition-components components)))
273 (if (= (length components) 0)
274 (error "Invalid composition component: %s" components)))
275 (or start (setq start 0)) 271 (or start (setq start 0))
276 (or end (setq end (length string))) 272 (or end (setq end (length string)))
277 (compose-string-internal string start end components modification-func) 273 (compose-string-internal string start end components modification-func)
diff --git a/src/ChangeLog b/src/ChangeLog
index eebb10fb472..d291f5f4e64 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
12012-02-02 Kenichi Handa <handa@m17n.org> 12012-02-02 Kenichi Handa <handa@m17n.org>
2 2
3 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
4 0, do not call append_composite_glyph.
5
62012-02-02 Kenichi Handa <handa@m17n.org>
7
3 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to 8 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
4 NULL (Bug#6988). 9 NULL (Bug#6988).
5 (x_produce_glyphs): If the component of a composition is a null 10 (x_produce_glyphs): If the component of a composition is a null
diff --git a/src/xdisp.c b/src/xdisp.c
index 864517b950c..75ea519e82e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -24595,10 +24595,6 @@ x_produce_glyphs (struct it *it)
24595 it->glyph_row->contains_overlapping_glyphs_p = 1; 24595 it->glyph_row->contains_overlapping_glyphs_p = 1;
24596 24596
24597 it->pixel_width = cmp->pixel_width; 24597 it->pixel_width = cmp->pixel_width;
24598 if (it->pixel_width == 0)
24599 /* We assure that all visible glyphs have at least 1-pixel
24600 width. */
24601 it->pixel_width = 1;
24602 it->ascent = it->phys_ascent = cmp->ascent; 24598 it->ascent = it->phys_ascent = cmp->ascent;
24603 it->descent = it->phys_descent = cmp->descent; 24599 it->descent = it->phys_descent = cmp->descent;
24604 if (face->box != FACE_NO_BOX) 24600 if (face->box != FACE_NO_BOX)
@@ -24630,7 +24626,7 @@ x_produce_glyphs (struct it *it)
24630 if (it->descent < 0) 24626 if (it->descent < 0)
24631 it->descent = 0; 24627 it->descent = 0;
24632 24628
24633 if (it->glyph_row) 24629 if (it->glyph_row && cmp->glyph_len > 0)
24634 append_composite_glyph (it); 24630 append_composite_glyph (it);
24635 } 24631 }
24636 else if (it->what == IT_COMPOSITION) 24632 else if (it->what == IT_COMPOSITION)