emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r107651: international/quail.el (quai


From: Kenichi Handa
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107651: international/quail.el (quail-insert-kbd-layout): Fix previous change. To avoid unwanted bidi reordering, use bidi-string-mark-left-to-right instead of inserting LRO and PDF.
Date: Thu, 22 Mar 2012 13:23:51 +0900
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107651 [merge]
committer: Kenichi Handa <address@hidden>
branch nick: trunk
timestamp: Thu 2012-03-22 13:23:51 +0900
message:
  international/quail.el (quail-insert-kbd-layout): Fix previous change.  To 
avoid unwanted bidi reordering, use bidi-string-mark-left-to-right instead of 
inserting LRO and PDF.
modified:
  lisp/ChangeLog
  lisp/international/quail.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-03-21 18:33:07 +0000
+++ b/lisp/ChangeLog    2012-03-22 04:23:16 +0000
@@ -1,3 +1,9 @@
+2012-03-22  Kenichi Handa  <address@hidden>
+
+       * international/quail.el (quail-insert-kbd-layout): Fix previous
+       change.  To avoid unwanted bidi reordering, use
+       bidi-string-mark-left-to-right instead of inserting LRO and PDF.
+
 2012-03-21  Dmitry Gutov  <address@hidden>
 
        * progmodes/ruby-mode.el: Don't confuse "end:" for "end" (bug#10786).

=== modified file 'lisp/international/quail.el'
--- a/lisp/international/quail.el       2012-03-12 07:42:02 +0000
+++ b/lisp/international/quail.el       2012-03-22 04:20:07 +0000
@@ -825,8 +825,6 @@
       (setq i 0)
       (while (< i quail-keyboard-layout-len)
        (when (= (% i 30) 0)
-         ;; Insert LRO to avoid bidi-reordering of keyboard cells.
-         (insert (propertize (string ?\x202d) 'invisible t))
          (setq row (/ i 30))
          (if (> row 1)
              (insert-char 32 (+ row (/ (- row 2) 2)))))
@@ -835,25 +833,26 @@
        (insert bar)
        (if (< (if (stringp lower) (string-width lower) (char-width lower)) 2)
            (insert " "))
-       (if (and (characterp lower)
-                (eq (get-char-code-property lower 'general-category) 'Mn))
-           ;; Pad the left and right of non-spacing characters.
-           (setq lower (compose-string (string lower) 0 1
-                                       (format "\t%c\t" lower))))
-       (if (and (characterp upper)
-                (eq (get-char-code-property upper 'general-category) 'Mn))
-           ;; Pad the left and right of non-spacing characters.
-           (setq upper (compose-string (string upper) 0 1
-                                       (format "\t%c\t" upper))))
-       (insert lower (propertize " " 'invisible t) upper)
-       (if (< (if (stringp upper) (string-width upper) (char-width upper)) 2)
+       (if (characterp lower)
+           (if (eq (get-char-code-property lower 'general-category) 'Mn)
+               ;; Pad the left and right of non-spacing characters.
+               (setq lower (compose-string (string lower) 0 1
+                                           (format "\t%c\t" lower)))
+             (setq lower (string lower))))
+       (if (characterp upper)
+           (if (eq (get-char-code-property upper 'general-category) 'Mn)
+               ;; Pad the left and right of non-spacing characters.
+               (setq upper (compose-string (string upper) 0 1
+                                           (format "\t%c\t" upper)))
+             (setq upper (string upper))))
+       (insert (bidi-string-mark-left-to-right lower)
+               (propertize " " 'invisible t)
+               (bidi-string-mark-left-to-right upper))
+       (if (< (string-width upper) 2)
            (insert " "))
        (setq i (+ i 2))
        (if (= (% i 30) 0)
-           (insert bar
-                   ;; Insert PDF to deny the previously inserted LRO.
-                   (propertize (string ?\x202c) 'invisible t)
-                   "\n")))
+           (insert bar "\n")))
       ;; Insert horizontal lines while deleting blank key columns at the
       ;; beginning and end of each line.
       (save-restriction


reply via email to

[Prev in Thread] Current Thread [Next in Thread]