From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Adding new variable for face-list in internal-make-lisp-face. Date: Sat, 04 Nov 2017 10:05:37 +0200 Message-ID: <8360aqv57y.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1509782750 30665 195.159.176.226 (4 Nov 2017 08:05:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Nov 2017 08:05:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Keith David Bershatsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 04 09:05:45 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAtSb-0007ZR-Dz for ged-emacs-devel@m.gmane.org; Sat, 04 Nov 2017 09:05:45 +0100 Original-Received: from localhost ([::1]:40073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAtSi-0006Zr-KE for ged-emacs-devel@m.gmane.org; Sat, 04 Nov 2017 04:05:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAtSY-0006Zm-9R for emacs-devel@gnu.org; Sat, 04 Nov 2017 04:05:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAtSV-00036P-3p for emacs-devel@gnu.org; Sat, 04 Nov 2017 04:05:42 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAtSV-00036L-0b; Sat, 04 Nov 2017 04:05:39 -0400 Original-Received: from [176.228.60.248] (port=2864 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eAtST-0004OF-6D; Sat, 04 Nov 2017 04:05:38 -0400 In-reply-to: (message from Keith David Bershatsky on Fri, 03 Nov 2017 15:01:34 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219912 Archived-At: > Date: Fri, 03 Nov 2017 15:01:34 -0700 > From: Keith David Bershatsky > Cc: emacs-devel@gnu.org > > I have a tab buffer-display-table entry that looks like: > > [(187 . 120) (9 . 121)] > > Your suggestion to use GLYPH_FACE would be more efficient than my using the C equivalent of: > > (aref buffer-display-table ?\t) > > ... and then iterating over the vector elements looking for a cons cell containing the number 9. > > I will work on incorporating GLYPH_FACE into my code, instead of using the above iteration. Thank you for the suggestion. > > Once the face id is obtained, I have been using C implementations of the following: I believe I already explained how to get the fore- and back-ground colors of a face given its ID in my message Re: Can we use FRAME_RIF to return a Lisp_Object result? I think you should use the same technique here.