From: Kenichi Handa Date: Wed, 10 Jun 2009 00:35:08 +0000 (+0000) Subject: (compose-gstring-for-terminal): For zero-width X-Git-Tag: emacs-pretest-23.0.95~96 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b8321d869395954ff005880866320784e24e334c;p=emacs.git (compose-gstring-for-terminal): For zero-width characters of Unicode category `Cf', simply replace it with SPC. --- 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 + + * 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 * 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))