summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2009-06-10 00:35:08 +0000
committerKenichi Handa <handa@m17n.org>2009-06-10 00:35:08 +0000
commitb8321d869395954ff005880866320784e24e334c (patch)
treeea9e9e5ef0b863f38ffd234329b7e3e18afe92b5
parent560bb6ea35eac0f487fcbcb859a0d87580edfe55 (diff)
downloademacs-b8321d869395954ff005880866320784e24e334c.tar.gz
(compose-gstring-for-terminal): For zero-width
characters of Unicode category `Cf', simply replace it with SPC.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/composite.el9
2 files changed, 13 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b73049a1101..cfab7c2065e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-10 Kenichi Handa <handa@m17n.org>
+
+ * composite.el (compose-gstring-for-terminal): For zero-width
+ characters of Unicode category `Cf', simply replace it with SPC.
+
2009-06-09 Agustín Martín <agustin.martin@hispalinux.es>
* ispell.el: Make `ispell-dictionary' customizable (#2555)
diff --git a/lisp/composite.el b/lisp/composite.el
index d3c000fe839..ce34336cede 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -681,7 +681,14 @@ a prepending a space before it."
(lglyph-set-from-to glyph i i)
(setq i (1+ i))))
(if (= (lglyph-width glyph) 0)
- (progn
+ (if (eq (get-char-code-property (lglyph-char glyph)
+ 'general-category)
+ 'Cf)
+ (progn
+ ;; Compose by replacing with a space.
+ (lglyph-set-char glyph 32)
+ (lglyph-set-width glyph 1)
+ (setq i (1+ i)))
;; Compose by prepending a space.
(setq gstring (lgstring-insert-glyph gstring i
(lglyph-copy glyph))