From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vinicius Jose Latorre Newsgroups: gmane.emacs.devel Subject: Integer & glyph (trunk and emacs_unicode) Date: Thu, 15 Nov 2007 18:15:32 -0300 Message-ID: <473CB6F4.6090002@ig.com.br> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1195157810 1975 80.91.229.12 (15 Nov 2007 20:16:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Nov 2007 20:16:50 +0000 (UTC) To: "GNU Emacs (devel)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 15 21:16:54 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 1Isl8k-0003N7-Bs for ged-emacs-devel@m.gmane.org; Thu, 15 Nov 2007 21:16:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Isl8W-0004yw-6B for ged-emacs-devel@m.gmane.org; Thu, 15 Nov 2007 15:16:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Isl7g-0004K5-21 for emacs-devel@gnu.org; Thu, 15 Nov 2007 15:15:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Isl7b-0004J8-Uj for emacs-devel@gnu.org; Thu, 15 Nov 2007 15:15:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Isl7b-0004J4-Rz for emacs-devel@gnu.org; Thu, 15 Nov 2007 15:15:31 -0500 Original-Received: from an-out-0708.google.com ([209.85.132.244]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Isl7b-0002Fv-Jc for emacs-devel@gnu.org; Thu, 15 Nov 2007 15:15:31 -0500 Original-Received: by an-out-0708.google.com with SMTP id c38so132995ana for ; Thu, 15 Nov 2007 12:15:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding:sender; bh=b/MqG+1wuAMD/iwOS+Fya75X4WrBhyM5q2gR6e4VMJ4=; b=m7eUK0rmw1i12/x1/02qga/OjDCCe6zhqRdaEY6lSw04PZtFL4VuRTPoCE577k29ho2i3s9P2ysDwWTlplR61V1imHDzLlvTR2DHfVApAOJKwrk3kZApJCCR5XlcgvF32Xn/PUdEvsL5s/2dSMs/aj/swU3doLoO+sItPI0VbXc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding:sender; b=Vlykr4kwY1bCyUl07ScGX0ztwEsDJOdW3nEV5WuC1LuoZbRnIgljHbpMjc027ii4iCBv+jiRFMrf4Ys2OAtcIH1PSuvkk+ey/q82BkJFXJG+aPy6lfNKINQ9Qq13FjtVQjGNy8qpTA+8t6ZmO6zCoq0pnKnmqKwWpjClBc9sBDY= Original-Received: by 10.101.66.14 with SMTP id t14mr1460031ank.1195157729933; Thu, 15 Nov 2007 12:15:29 -0800 (PST) Original-Received: from ?192.168.0.100? ( [201.82.39.78]) by mx.google.com with ESMTPS id b18sm3018007ana.2007.11.15.12.15.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 15 Nov 2007 12:15:28 -0800 (PST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20071009 SeaMonkey/1.1.5 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:83291 Archived-At: It seems that glyphs have some problems as it's implemented by make-glyph-code, glyph-char and glyph-face in disp-table.el file. The integers in Emacs Lisp have a minimum range from -2**28 to 2**28 - 1, that is, 29 bits. In my system (AMD Athlon 64 - GNU/Linux Debian using Emacs 23.0.50.1 - CVS trunk) integers in Emacs Lisp have 29 bits. The make-glyph-code in Emacs 23.0.50.1 (CVS trunk) is: (defun make-glyph-code (char &optional face) "Return a glyph code representing char CHAR with face FACE." ;; Due to limitations on Emacs integer values, faces with ;; face id greater that 4091 are silently ignored. (if (and face (<= (face-id face) #xfff)) (logior char (lsh (face-id face) 19)) char)) So, it assumes 12 bits for face id and 19 bits for char code, the result is an integer of 31 bits. Shouldn't it be used #x3ff (10 bits for face id) instead of #xfff? BTW, the same thing happens in Emacs unicode branch.