From xemacs-m  Sat Mar 22 19:18:22 1997
Received: from crystal.WonderWorks.COM (crystal.WonderWorks.com [192.203.206.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id TAA01825
	for <xemacs-beta@xemacs.org>; Sat, 22 Mar 1997 19:18:21 -0600 (CST)
Received: by crystal.WonderWorks.COM 
	id QQciav01127; Sat, 22 Mar 1997 20:18:22 -0500 (EST)
Date: Sat, 22 Mar 1997 20:18:22 -0500 (EST)
Message-Id: <QQciav01127.199703230118@crystal.WonderWorks.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Kyle Jones <kyle_jones@wonderworks.com>
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Buffer-specific display-tables
In-Reply-To: <kigybbguf5t.fsf@jagor.srce.hr>
References: <kigybbguf5t.fsf@jagor.srce.hr>
X-Mailer: VM 6.22 under 19.15 XEmacs Lucid (beta103)
X-Face: /cA45WHG7jWq>(O3&Z57Y<"WsX5ddc,4c#w0F*zrV#=M
        0@~@,s;b,aMtR5Sqs"+nU.z^CSFQ9t`z2>W,S,]:[+2^
        Nbf6v4g>!&,7R4Ot4Wg{&tm=WX7P["9%a)_da48-^tGy
        ,qz]Z,Zz\{E.,]'EO+F)@$KtF&V

Hrvoje Niksic writes:
 > Buffer-specific display tables don't seem to work for me.  Take this
 > snippet of code:
 > 
 > (let ((table (make-display-table)))
 >   (aset table ?\0 "?")
 >   (set-specifier current-display-table table (current-buffer)))
 > 
 > This should set ^@ to be printed as ? in the current buffer only.  If
 > I remove the `(current-buffer)' locale argument, I the behaviour is
 > correct, but it's not what I want.
 > 
 > Is this a bug in display-table code, specifiers code, or am I doing
 > something wrong?  Specifiers seem to be a powerful and simple-to-use
 > feature -- I'd hate this basic functionality to be buggy. :-(

Well, it looked easy to fix.  The function get_display_table()
needs to roll a call a specifier_instance after checking the
FACE_CACHEL stuff.  But down in the depths of the specifier code I
found a function that has the dreaded

  /* This function can GC */

at the top.  It is not immediately obvious whether this is a bad
thing to do at the particular point in the redisplay code where
get_display_table() is called.  But it probably is.

