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: make-glyph-code incompatibility Date: Tue, 04 Mar 2008 11:02:04 -0500 Message-ID: References: <873ar773m1.fsf@kfs-lx.rd.rdm> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204646574 30564 80.91.229.12 (4 Mar 2008 16:02:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Mar 2008 16:02:54 +0000 (UTC) Cc: emacs-devel@gnu.org To: storm@cua.dk (Kim F. Storm) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 04 17:03:20 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 1JWZbS-0004yN-IR for ged-emacs-devel@m.gmane.org; Tue, 04 Mar 2008 17:02:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JWZav-0007bd-Fo for ged-emacs-devel@m.gmane.org; Tue, 04 Mar 2008 11:02:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JWZar-0007bE-FU for emacs-devel@gnu.org; Tue, 04 Mar 2008 11:02:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JWZaq-0007am-1a for emacs-devel@gnu.org; Tue, 04 Mar 2008 11:02:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JWZap-0007aj-Ta for emacs-devel@gnu.org; Tue, 04 Mar 2008 11:02:15 -0500 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JWZap-0006kn-Gg for emacs-devel@gnu.org; Tue, 04 Mar 2008 11:02:15 -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 8946B2CF6CE; Tue, 4 Mar 2008 11:02:14 -0500 (EST) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 4919B3FE0; Tue, 4 Mar 2008 11:02:04 -0500 (EST) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 237686C258; Tue, 4 Mar 2008 11:02:04 -0500 (EST) In-Reply-To: <873ar773m1.fsf@kfs-lx.rd.rdm> (Kim F. Storm's message of "Tue, 04 Mar 2008 01:08:22 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (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=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:91292 Archived-At: >> The new make-glyph-code is a good change, but it introduces >> an incompatibility. It seems that it makes previously working code >> fail silently. Can we make it fail with an informative message? > The new encoding still merges a face id and char code into > an integer if the face id is < 64. So an integer value may > still carry a face id in the upper bits. Is it worth the trouble? > Of course, I could make it always use a cons cell for > non-default face. I thought that's what we did. It would seem preferable because simpler. > Then we could check (and warn) if an integer value is >= 1^22, but > even if we do that, it can fail: > For example, how do you differentiate > 1 << 19 + ?a (emacs 22 glyph code for 'a' in mode-line face) > and the unicode character with the same numeric value in emacs 23 ? Yes, it's a limitation to our ability to detect the problem. > Also, issuing warnings during redisplay is a mess! I was thinking maybe we could display such invalid glyphs as a string "invalid-glyph". But I definitely do not want to expand a lot of effort into this checking. I just figured that maybe there's a cheap way to detect the problem and make the failure easier to diagnose (compared to "my vertical tab line doesn't show any more" which is harder to debug unless we know that the vertical tab line is using glyphs). Stefan