From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: RE: cannot understand Elisp manual node Glyphs Date: Wed, 7 Feb 2007 08:16:13 -0800 (PST) Message-ID: <39241.128.165.123.18.1170864973.squirrel@webmail.lanl.gov> References: Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1170865009 27922 80.91.229.12 (7 Feb 2007 16:16:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Feb 2007 16:16:49 +0000 (UTC) Cc: Emacs-Devel To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 07 17:16:33 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 1HEpTB-0001Z5-Eu for ged-emacs-devel@m.gmane.org; Wed, 07 Feb 2007 17:16:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HEpTA-0007vU-UD for ged-emacs-devel@m.gmane.org; Wed, 07 Feb 2007 11:16:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HEpSz-0007vP-Cu for emacs-devel@gnu.org; Wed, 07 Feb 2007 11:16:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HEpSx-0007uk-5V for emacs-devel@gnu.org; Wed, 07 Feb 2007 11:16:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HEpSw-0007ug-Ty for emacs-devel@gnu.org; Wed, 07 Feb 2007 11:16:14 -0500 Original-Received: from mailwasher.lanl.gov ([192.65.95.54] helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HEpSw-0006rJ-FT for emacs-devel@gnu.org; Wed, 07 Feb 2007 11:16:14 -0500 Original-Received: from mailrelay3.lanl.gov (mailrelay3.lanl.gov [128.165.4.104]) by mailwasher-b.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l17GGD8U025800 for ; Wed, 7 Feb 2007 09:16:14 -0700 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay3.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l17GGDcT025615; Wed, 7 Feb 2007 09:16:13 -0700 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id l17GGDwc001477; Wed, 7 Feb 2007 09:16:13 -0700 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id l17GGD7K001475; Wed, 7 Feb 2007 08:16:13 -0800 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.18 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Wed, 7 Feb 2007 08:16:13 -0800 (PST) In-Reply-To: User-Agent: SquirrelMail/1.4.8-2.el3.7lanl X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 X-detected-kernel: Linux 2.4-2.6 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:66068 Archived-At: >> You set each element of the vector using make-glyph-with-face, e.g. >> >> (vector (make-glyph-with-face ?x 'bold) >> (make-glyph-with-face ?y 'bold) >> (make-glyph-with-face ?z 'bold)) > > I see; thx. For what it's worth, I offer (defun string-to-glyphs (str &optional face) "Return a glyph vector representing string STR with face FACE." (vconcat (mapcar (lambda (c) (make-glyph-with-face c face)) str))) where I have trivially extended Kim's function: (defun make-glyph-with-face (c face) "Return a glyph code representing char C with face FACE." (logior c (lsh (if face (face-id face) 0) 19))) Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.