[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Integer & glyph (trunk and emacs_unicode)
From: |
Vinicius Jose Latorre |
Subject: |
Integer & glyph (trunk and emacs_unicode) |
Date: |
Thu, 15 Nov 2007 18:15:32 -0300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20071009 SeaMonkey/1.1.5 |
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.
- Integer & glyph (trunk and emacs_unicode),
Vinicius Jose Latorre <=
Re: Integer & glyph (trunk and emacs_unicode), Richard Stallman, 2007/11/16