[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106077: Fix the "C-x =" display of t
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106077: Fix the "C-x =" display of the character info for LRE, LRO, RLE, and RLO. |
Date: |
Thu, 13 Oct 2011 13:58:54 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106077
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Thu 2011-10-13 13:58:54 +0200
message:
Fix the "C-x =" display of the character info for LRE, LRO, RLE, and RLO.
lisp/simple.el (what-cursor-position): Fix the display of the
character info for LRE, LRO, RLE, and RLO characters, by appending a
PDF to them.
modified:
lisp/ChangeLog
lisp/simple.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-10-13 05:18:12 +0000
+++ b/lisp/ChangeLog 2011-10-13 11:58:54 +0000
@@ -1,3 +1,8 @@
+2011-10-13 Eli Zaretskii <address@hidden>
+
+ * simple.el (what-cursor-position): Fix the display of the
+ character info for LRE, LRO, RLE, and RLO characters.
+
2011-10-13 Stefan Monnier <address@hidden>
* emacs-lisp/timer.el (with-timeout): Make sure we cancel the timer
=== modified file 'lisp/simple.el'
--- a/lisp/simple.el 2011-10-08 16:37:46 +0000
+++ b/lisp/simple.el 2011-10-13 11:58:54 +0000
@@ -1050,6 +1050,16 @@
in *Help* buffer. See also the command `describe-char'."
(interactive "P")
(let* ((char (following-char))
+ ;; If the character is one of LRE, LRO, RLE, RLO, it will
+ ;; start a directional embedding, which could completely
+ ;; disrupt the rest of the line (e.g., RLO will display the
+ ;; rest of the line right-to-left). So we put an invisible
+ ;; PDF character after these characters, to end the
+ ;; embedding, which eliminates any effects on the rest of the
+ ;; line.
+ (pdf (if (memq char '(?\x202a ?\x202b ?\x202d ?\x202e))
+ (propertize (string ?\x202c) 'invisible t)
+ ""))
(beg (point-min))
(end (point-max))
(pos (point))
@@ -1109,18 +1119,18 @@
;; We show the detailed information about CHAR.
(describe-char (point)))
(if (or (/= beg 1) (/= end (1+ total)))
- (message "Char: %s %s point=%d of %d (%d%%) <%d-%d> column=%d%s"
+ (message "Char: %s%s %s point=%d of %d (%d%%) <%d-%d> column=%d%s"
(if (< char 256)
(single-key-description char)
(buffer-substring-no-properties (point) (1+ (point))))
- encoding-msg pos total percent beg end col hscroll)
- (message "Char: %s %s point=%d of %d (%d%%) column=%d%s"
+ pdf encoding-msg pos total percent beg end col hscroll)
+ (message "Char: %s%s %s point=%d of %d (%d%%) column=%d%s"
(if enable-multibyte-characters
(if (< char 128)
(single-key-description char)
(buffer-substring-no-properties (point) (1+ (point))))
(single-key-description char))
- encoding-msg pos total percent col hscroll))))))
+ pdf encoding-msg pos total percent col hscroll))))))
;; Initialize read-expression-map. It is defined at C level.
(let ((m (make-sparse-keymap)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106077: Fix the "C-x =" display of the character info for LRE, LRO, RLE, and RLO.,
Eli Zaretskii <=