From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: buff-menu header wrong char Date: Fri, 03 Dec 2004 14:57:04 -0500 Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1102103875 10174 80.91.229.6 (3 Dec 2004 19:57:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 3 Dec 2004 19:57:55 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 03 20:57:47 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CaJYo-0006Bk-00 for ; Fri, 03 Dec 2004 20:57:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CaJiO-0000pv-UW for ged-emacs-devel@m.gmane.org; Fri, 03 Dec 2004 15:07:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CaJi8-0000pm-2S for emacs-devel@gnu.org; Fri, 03 Dec 2004 15:07:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CaJi7-0000pR-Eg for emacs-devel@gnu.org; Fri, 03 Dec 2004 15:07:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CaJi7-0000pH-Al for emacs-devel@gnu.org; Fri, 03 Dec 2004 15:07:23 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CaJYF-0008IW-Hs for emacs-devel@gnu.org; Fri, 03 Dec 2004 14:57:11 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 3C4C98282A6; Fri, 3 Dec 2004 14:57:11 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id CAFF64AC50A; Fri, 3 Dec 2004 14:57:04 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id B88018CA69; Fri, 3 Dec 2004 14:57:04 -0500 (EST) Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=0, requis 5, autolearn=not spam) X-MailScanner-From: monnier@iro.umontreal.ca 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: main.gmane.org gmane.emacs.devel:30647 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:30647 > A *Buffer List* looks like this: >=20 > CRM Buffer Size Mode File > =C3=B4=C3=B4=C3=B4 =C3=B4=C3=B4=C3=B4=C3=B4=C3=B4=C3=B4 = =C3=B4=C3=B4=C3=B4=C3=B4 =C3=B4=C3=B4=C3=B4=C3=B4 =C3=B4=C3= =B4=C3=B4=C3=B4 > . *scratch* 0 Lisp Interaction > * *Messages* 150 Fundamental Hmm... my crystal ball tells me you're running in unibyte mode. I'd *strongly* advise you don't do that. > (if (char-displayable-p ?=E2=80=94) ?=E2=80=94 ?-))) So it seems the problem is that in unibyte mode, char-displayable-p on the non-ASCII char above returns non-nil (because you do have the font to display such a char) even though the char will actually not be properly displayed after it's inserted in the buffer because the insertion into the unibyte buffer changes the char (I really think it should signal an error instead, but that's another fight). Does anyone object to the patch below? Stefan --- mule-util.el 12 oct 2004 12:05:54 -0400 1.56 +++ mule-util.el 03 d=E9c 2004 14:52:41 -0500=09 @@ -2,7 +2,7 @@ =20 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. -;; Copyright (C) 2000, 2002 Free Software Foundation, Inc. +;; Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. =20 ;; Keywords: mule, multilingual =20 @@ -356,6 +356,9 @@ (cond ((< char 256) ;; Single byte characters are always displayable. t) + ((not enable-multibyte-characters) + ;; Maybe there's a font for it, but we can't put it in the buffer. + nil) ((display-multi-font-p) ;; On a window system, a character is displayable if we have ;; a font for that character in the default face of the @@ -377,5 +380,5 @@ ;; coding: iso-2022-7bit ;; End: =20 -;;; arch-tag: 5bdb52b6-a3a5-4529-b7a0-37d01b0e570b +;; arch-tag: 5bdb52b6-a3a5-4529-b7a0-37d01b0e570b ;;; mule-util.el ends here