From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: compose-region docstring update (was: using glyphs by default in perl-mode) Date: Sun, 09 Jun 2013 08:45:48 -0400 Message-ID: References: <877gi6qa57.fsf_-_@lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1370781954 22957 80.91.229.3 (9 Jun 2013 12:45:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Jun 2013 12:45:54 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 09 14:45:55 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ulf0L-0006Fs-OO for ged-emacs-devel@m.gmane.org; Sun, 09 Jun 2013 14:45:53 +0200 Original-Received: from localhost ([::1]:33154 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ulf0L-0005Ib-C8 for ged-emacs-devel@m.gmane.org; Sun, 09 Jun 2013 08:45:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ulf0I-0005IT-Fb for emacs-devel@gnu.org; Sun, 09 Jun 2013 08:45:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ulf0G-0001Jd-WB for emacs-devel@gnu.org; Sun, 09 Jun 2013 08:45:50 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ulf0G-0001JZ-ST for emacs-devel@gnu.org; Sun, 09 Jun 2013 08:45:48 -0400 Original-Received: from handa by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Ulf0G-0005BG-LV for emacs-devel@gnu.org; Sun, 09 Jun 2013 08:45:48 -0400 In-Reply-To: <877gi6qa57.fsf_-_@lifelogs.com> (message from Ted Zlatanov on Fri, 07 Jun 2013 10:16:04 -0400) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:160283 Archived-At: In article <877gi6qa57.fsf_-_@lifelogs.com>, Ted Zlatanov writes: KH> Yes. And, here are simple examples: KH> (insert (compose-string "." 0 1 '(?+ (tc . bc) ?o))) KH> (insert (compose-string "." 0 1 '(?+ (cc . cc) ?o))) > Thanks for the examples. Can you explain them (I think I do, but your > words would be welcome help)? I will update the docstring once I > understand this well enough. I'll try to explain the first example. In it, compose-string has the optional 4th argument COMPONENTS. The explanation of COMPONENTS (of type "list") is explained in compose-region as below: If it is a vector or list, it is a sequence of alternate characters and composition rules, where (2N)th elements are characters and (2N+1)th elements are composition rules to specify how to compose (2N+2)th elements with previously composed N glyphs. So, as for (?+ (tc . bc) ?o), ?+ is the first alternate character, (tc . bc) is the first composition rule, ?o is the second alternate character. This means ?o is composed with ?+ by the rule (tc . bc). And the docstring of reference-point-alist explains the meaing of (tc . bc). According to the docstring, it means that ?o is compose with ?+ by aligning the top-center point of the glyphs of ?+ and the bottom-center point of the glyph of ?o. That yeilds a glyph whose lower part is ?+ and upper part is ?o. --- Kenichi Handa handa@gnu.org