From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: mouse-face hightlighting fails with inserted unicode Date: Mon, 11 Feb 2008 12:40:40 -0500 Message-ID: References: <87k5lbsew9.fsf@escher.local.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202751765 7935 80.91.229.12 (11 Feb 2008 17:42:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Feb 2008 17:42:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stephen Berman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 11 18:43:07 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JOcgM-00038n-5b for ged-emacs-devel@m.gmane.org; Mon, 11 Feb 2008 18:43:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOcfs-00053D-Rr for ged-emacs-devel@m.gmane.org; Mon, 11 Feb 2008 12:42:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOce4-0003sv-E9 for emacs-devel@gnu.org; Mon, 11 Feb 2008 12:40:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOce2-0003rh-Rp for emacs-devel@gnu.org; Mon, 11 Feb 2008 12:40:44 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOce2-0003rb-Jj for emacs-devel@gnu.org; Mon, 11 Feb 2008 12:40:42 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JOce2-0004ni-9z for emacs-devel@gnu.org; Mon, 11 Feb 2008 12:40:42 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAGQWsEdMCpK7/2dsb2JhbACpLHs X-IronPort-AV: E=Sophos;i="4.25,334,1199682000"; d="scan'208";a="14053952" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 11 Feb 2008 12:40:41 -0500 Original-Received: from pastel.home ([76.10.146.187]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id RTZ02341; Mon, 11 Feb 2008 12:40:41 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 7178C804C; Mon, 11 Feb 2008 12:40:40 -0500 (EST) In-Reply-To: <87k5lbsew9.fsf@escher.local.home> (Stephen Berman's message of "Mon, 11 Feb 2008 16:15:34 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88773 Archived-At: >>>>> "Stephen" == Stephen Berman 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