From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: port x-symbol to GNU emacs 24. Date: Wed, 19 Aug 2015 21:05:44 +0200 Message-ID: <87wpwrcd4n.fsf@gnu.org> References: <87oaia6ict.fsf@mat.ucm.es> <837foxor1t.fsf@gnu.org> <878u9d7vdg.fsf@mat.ucm.es> <87pp2pq2ht.fsf@gnu.org> <87wpwx68cn.fsf@mat.ucm.es> <87mvxqxtif.fsf@gnu.org> <838u9alzly.fsf@gnu.org> <874mjyaqm8.fsf@fencepost.gnu.org> <87d1yl2dq9.fsf@gnu.org> <87r3mz91h2.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1440116381 21310 80.91.229.3 (21 Aug 2015 00:19:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Aug 2015 00:19:41 +0000 (UTC) Cc: Eli Zaretskii , David Kastrup , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 21 02:19:31 2015 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 1ZSa3O-0007HJ-1A for ged-emacs-devel@m.gmane.org; Fri, 21 Aug 2015 02:19:30 +0200 Original-Received: from localhost ([::1]:38207 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSa3N-0004s2-C1 for ged-emacs-devel@m.gmane.org; Thu, 20 Aug 2015 20:19:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS8gK-0006Le-Tn for emacs-devel@gnu.org; Wed, 19 Aug 2015 15:05:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZS8gH-0003dk-Gy for emacs-devel@gnu.org; Wed, 19 Aug 2015 15:05:52 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:39041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS8gG-0003dJ-I3 for emacs-devel@gnu.org; Wed, 19 Aug 2015 15:05:48 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2724820A41 for ; Wed, 19 Aug 2015 15:05:48 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 19 Aug 2015 15:05:48 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=VS901NiLUj43YWlajde76O/OAMQ=; b=MVgZE WP7HbWuV+5mgDZbiUZaFbEmxLYvQgKDOcLNK+hNG+pb1WhMuMuHdk1Ze74lu6ZXl vEa5xIwCiJDxZmiDwuyBEJrWSVmNqDRTyIXIW3nFaNub9NZfSlIgBWYIWfvgq2me i++kWsKxWUbmf8QN+mbLT76JLgDQUDy+JwvVrE= X-Sasl-enc: nch5LUu2XWC8ksf1YiTbgBy/kTHvBoNKd09U92vvZNre 1440011147 Original-Received: from thinkpad-t440p (unknown [2.160.238.117]) by mail.messagingengine.com (Postfix) with ESMTPA id CCC25C00025; Wed, 19 Aug 2015 15:05:46 -0400 (EDT) Mail-Followup-To: Stefan Monnier , David Kastrup , Eli Zaretskii , emacs-devel@gnu.org In-Reply-To: (Stefan Monnier's message of "Wed, 19 Aug 2015 13:29:46 -0400") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 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:188992 Archived-At: Stefan Monnier writes: >>> prettify-symbols-alist does currently handle non-symbol chars. >>> Whether it handles this specific case, I'm not completely sure (tho >>> I'm pretty sure it'll mishandle "\alpha2", in any case). But we >>> should make prettify-symbols-alist handle the needs of TeX, so feel >>> free to suggest extensions to prettify-symbols-alist if that's needed. >> Well, it's actually not as simple as I've thought before. It does in >> fact handle some non-symbol things but it depends on the syntax before >> and after the matched thing. > > Indeed. And if we want to handle \alpha2 correctly, I think we'll > need to extend prettify-symbols-mode somehow to let latex-mode teach > prettify-symbols-mode how to properly recognize whether a given \alpha > should be composed or not. It doesn't compose \alpha2 so that's already handled correctly, no? But at the same time, it also doesn't compose .\alpha where . could be any character with punctuation syntax. And at least that's not right for tex. > In some earlier prettify-symbols code (the one used in haskell-mode), > I extended the alist so that each element can have a predicate > checking whether this occurrence should be composed (this is used in > Haskell for the "." which can either be the function-composition infix > operator, or the usual separator used within identifiers as in > List.map). > > We should probably extend prettify-symbols-alist similarly, but in the > case of TeX, I think setting a predicate for every entry is > inconvenient, and we should instead set a "global" predicate which is > applied to every entry (and is used instead of the default code which > checks the syntax-class of surrounding characters). Yes, that sounds like a good solution for making \alpha work when a punctuation character preceedes it. Bye, Tassilo