From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: bug of display-table & make-glyph-code Date: Sat, 08 Sep 2007 03:00:48 -0400 Message-ID: References: <200708271732.22306.zslevin@gmail.com> <46DD9F41.8090700@gmx.at> <87bqch1nhz.fsf@kfs-lx.testafd.dk> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1189237021 3776 80.91.229.12 (8 Sep 2007 07:37:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 Sep 2007 07:37:01 +0000 (UTC) Cc: eliz@gnu.org, zslevin@gmail.com, emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 08 09:37:01 2007 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 1ITusG-0001Cv-Hq for ged-emacs-devel@m.gmane.org; Sat, 08 Sep 2007 09:37:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITusE-0002G8-Fu for ged-emacs-devel@m.gmane.org; Sat, 08 Sep 2007 03:36:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ITupi-0001BT-Fe for emacs-devel@gnu.org; Sat, 08 Sep 2007 03:34:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ITupe-00018v-JH for emacs-devel@gnu.org; Sat, 08 Sep 2007 03:34:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITupe-00018p-CP for emacs-devel@gnu.org; Sat, 08 Sep 2007 03:34:18 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ITupe-000452-0W for emacs-devel@gnu.org; Sat, 08 Sep 2007 03:34:18 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1ITuJE-00036K-BZ; Sat, 08 Sep 2007 03:00:48 -0400 In-reply-to: (message from Kenichi Handa on Fri, 07 Sep 2007 21:25:41 +0900) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) 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:78228 Archived-At: But, then, it seems that the design is broken (or got broken because of introduction of multibyte characters). It grows glyph-table one by one. So, at some point a glyph code is simply a character code, but after several calls of create-glyph, that same glyph code becomes an index into glyph-table, and is displayed differently. Those codes are meaningless as characters. They start at 256. Meaningful Mule characters codes are much larger. If you were to define thousands of glyph codes, you might get into the range of meaningful Mule characters. Then indeed things would break. So there is a bug, in that this could happen. But it is not the case that all use of create-glyph is broken. I am not sure whether create-glyph is very useful nowadays. Maybe it is obsolete, due to Mule. Who still ses it and why does he use it? But, for instance, the return value of (make-glyph-code 256) is a simple glyph or not depending on the current length of glyph-table. Code 256 is useful only if you have defined it as an entry in the glyph table.