emacs-devel
[Top][All Lists]
Advanced

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

Re: mouse-face hightlighting fails with inserted unicode


From: Stefan Monnier
Subject: Re: mouse-face hightlighting fails with inserted unicode
Date: Mon, 11 Feb 2008 12:40:40 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

>>>>> "Stephen" == Stephen Berman <address@hidden> writes:

> With Emacs 22.1, 23.0.50 and 23.0.60:
> 1. emacs -Q
> 2. Type some characters, e.g. "aa".
> 3. M-: (put-text-property (point-min) (point-max) 'mouse-face 'highlight)
> 4. Run the mouse over "aa" and see the highlighting over each character.
> 5. Type another character; now the buffer displays e.g. "aba", and still
> all characters show mouse-face highlighting.
> 6. Delete the "b" and type M-: (insert (format "%s" "\x62"))
>    => Now the buffer again displays "aba", but "b" does not show
>    mouse-face highlighting.
> 7. Delete the "b" and type M-x ucs-insert RET 62 RET
>    => Again the buffer again displays "aba" and "b" does not show
>    mouse-face highlighting.

Step 6 is expected.
I installed the patch below which should fix step 7.


        Stefan


Index: lisp/international/mule-cmds.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/international/mule-cmds.el,v
retrieving revision 1.321
diff -u -r1.321 mule-cmds.el
--- lisp/international/mule-cmds.el     8 Feb 2008 20:43:16 -0000       1.321
+++ lisp/international/mule-cmds.el     11 Feb 2008 17:38:57 -0000
@@ -2854,7 +2854,7 @@
       (setq arg (string-to-number arg 16)))
   (if (or (< arg 0) (> arg #x10FFFF))
       (error "Not a Unicode character code: 0x%X" arg))
-  (insert arg))
+  (insert-and-inherit arg))
 
 
 ;; arch-tag: b382c432-4b36-460e-bf4c-05efd0bb18dc




reply via email to

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