From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Stephen Berman <Stephen.Berman@gmx.net>
Cc: emacs-devel@gnu.org
Subject: Re: mouse-face hightlighting fails with inserted unicode
Date: Mon, 11 Feb 2008 12:40:40 -0500 [thread overview]
Message-ID: <jwv8x1r1jgo.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87k5lbsew9.fsf@escher.local.home> (Stephen Berman's message of "Mon, 11 Feb 2008 16:15:34 +0100")
>>>>> "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
next prev parent reply other threads:[~2008-02-11 17:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-11 15:15 mouse-face hightlighting fails with inserted unicode Stephen Berman
2008-02-11 17:40 ` Stefan Monnier [this message]
2008-02-11 19:11 ` Stephen Berman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv8x1r1jgo.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=Stephen.Berman@gmx.net \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.