summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2012-02-02 18:07:29 +0900
committerKenichi Handa <handa@m17n.org>2012-02-02 18:07:29 +0900
commitc5d3843c34587a1584b5ebcf3a693cbfe74bb5c3 (patch)
tree55ddf541f7aa7d1c2341f3317ee6b3e9ef6bf4e3
parent159462d4d179b280c6e68775bbf0630c3317c486 (diff)
downloademacs-c5d3843c34587a1584b5ebcf3a693cbfe74bb5c3.tar.gz
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 @@
2012-02-02 Kenichi Handa <handa@m17n.org>
+ * (compose-region): Cancel previous change.
+
+2012-02-02 Kenichi Handa <handa@m17n.org>
+
* composite.el (compose-region, compose-string): Signal error for
a null string component (Bug#6988).
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.
If it is a character, it is an alternate character to display instead
of the text in the region.
-If it is a string, the elements are one or more alternate characters. In
+If it is a string, the elements are alternate characters. In
this case, TAB element has a special meaning. If the first
character is TAB, the glyphs are displayed with left padding space
so that no pixel overlaps with the previous column. If the last
@@ -234,9 +234,7 @@ text in the composition."
(let ((modified-p (buffer-modified-p))
(inhibit-read-only t))
(if (or (vectorp components) (listp components))
- (setq components (encode-composition-components components))
- (if (= (length components) 0)
- (error "Invalid composition component: %s" components)))
+ (setq components (encode-composition-components components)))
(compose-region-internal start end components modification-func)
(restore-buffer-modified-p modified-p)))
@@ -269,9 +267,7 @@ Optional 5th argument MODIFICATION-FUNC is a function to call to
adjust the composition when it gets invalid because of a change of
text in the composition."
(if (or (vectorp components) (listp components))
- (setq components (encode-composition-components components))
- (if (= (length components) 0)
- (error "Invalid composition component: %s" components)))
+ (setq components (encode-composition-components components)))
(or start (setq start 0))
(or end (setq end (length string)))
(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 @@
2012-02-02 Kenichi Handa <handa@m17n.org>
+ (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
+ 0, do not call append_composite_glyph.
+
+2012-02-02 Kenichi Handa <handa@m17n.org>
+
* xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
NULL (Bug#6988).
(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)
it->glyph_row->contains_overlapping_glyphs_p = 1;
it->pixel_width = cmp->pixel_width;
- if (it->pixel_width == 0)
- /* We assure that all visible glyphs have at least 1-pixel
- width. */
- it->pixel_width = 1;
it->ascent = it->phys_ascent = cmp->ascent;
it->descent = it->phys_descent = cmp->descent;
if (face->box != FACE_NO_BOX)
@@ -24630,7 +24626,7 @@ x_produce_glyphs (struct it *it)
if (it->descent < 0)
it->descent = 0;
- if (it->glyph_row)
+ if (it->glyph_row && cmp->glyph_len > 0)
append_composite_glyph (it);
}
else if (it->what == IT_COMPOSITION)