all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* mouse-face hightlighting fails with inserted unicode
@ 2008-02-11 15:15 Stephen Berman
  2008-02-11 17:40 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Berman @ 2008-02-11 15:15 UTC (permalink / raw)
  To: emacs-devel

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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mouse-face hightlighting fails with inserted unicode
  2008-02-11 15:15 mouse-face hightlighting fails with inserted unicode Stephen Berman
@ 2008-02-11 17:40 ` Stefan Monnier
  2008-02-11 19:11   ` Stephen Berman
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2008-02-11 17:40 UTC (permalink / raw)
  To: Stephen Berman; +Cc: emacs-devel

>>>>> "Stephen" == Stephen Berman <Stephen.Berman@gmx.net> 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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mouse-face hightlighting fails with inserted unicode
  2008-02-11 17:40 ` Stefan Monnier
@ 2008-02-11 19:11   ` Stephen Berman
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Berman @ 2008-02-11 19:11 UTC (permalink / raw)
  To: emacs-devel

On Mon, 11 Feb 2008 12:40:40 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote:

>>>>>> "Stephen" == Stephen Berman <Stephen.Berman@gmx.net> 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.

Oh, sorry; I had had noticed the issue with ucs-insert and then tried
inserting the same characters with `format' but forgot about the
non-inheritance of `insert'.

> I installed the patch below which should fix step 7.

Thanks.

Steve Berman





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-11 19:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 15:15 mouse-face hightlighting fails with inserted unicode Stephen Berman
2008-02-11 17:40 ` Stefan Monnier
2008-02-11 19:11   ` Stephen Berman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.