From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: using glyphs by default in perl-mode Date: Wed, 05 Jun 2013 12:13:00 -0400 Message-ID: References: <87d2sp92vb.fsf@lifelogs.com> <87bo877kf7.fsf@lifelogs.com> <87obbs7cew.fsf@lifelogs.com> <87ip1y54fx.fsf@lifelogs.com> <87ehck6670.fsf@lifelogs.com> <87a9n854tx.fsf@lifelogs.com> <8761xw54rv.fsf@lifelogs.com> <87sj0y4p7h.fsf@lifelogs.com> <87ppw13aky.fsf@lifelogs.com> <874ndc39bt.fsf@lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1370448798 16996 80.91.229.3 (5 Jun 2013 16:13:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Jun 2013 16:13:18 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 05 18:13:18 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 1UkGKo-0000uz-L5 for ged-emacs-devel@m.gmane.org; Wed, 05 Jun 2013 18:13:14 +0200 Original-Received: from localhost ([::1]:45235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkGKo-0007E6-3z for ged-emacs-devel@m.gmane.org; Wed, 05 Jun 2013 12:13:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkGKh-0007Cw-6J for emacs-devel@gnu.org; Wed, 05 Jun 2013 12:13:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkGKc-0006lu-0T for emacs-devel@gnu.org; Wed, 05 Jun 2013 12:13:07 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:36217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkGKb-0006kJ-SR for emacs-devel@gnu.org; Wed, 05 Jun 2013 12:13:01 -0400 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r55GD1Bg007328; Wed, 5 Jun 2013 12:13:01 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id E938EB4108; Wed, 5 Jun 2013 12:13:00 -0400 (EDT) In-Reply-To: <874ndc39bt.fsf@lifelogs.com> (Ted Zlatanov's message of "Wed, 05 Jun 2013 10:45:26 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4600=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4600> : streams <974507> : uri <1439201> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:160118 Archived-At: > Done and in trunk. Thanks for all the help and reviews from you and > Davis Herring. Thank you, Ted. > I also thought about `put-text-property' of an image but that's pretty > ugly and special-cases all the code, plus it has update issues in some > cases (deleting characters and reinserting them doesn't trigger the > image again). It would be really nice to be able to use > `compose-region' and use an image to create a glyph. For now it's a > TODO but I think it would be a hit with users. If anyone is interested > or wants to tell me how it could work, let me know. I think this is pushing it "too far": I'm not opposed to such a feature in general, but I'm not sure it would benefit much from sharing some code with the current prog-prettify code. BTW, one problematic part with the use of images is when you need to scale them to fit the text's size. > The other TODO item is to simplify this support so it doesn't require > special effort when setting `font-lock-defaults'. I don't know how that > would work internally so I'll wait for Stefan or someone else to give me > hints or implement it. I think the best way to do that is going to be to provide a function that uses font-lock-add-keywords internally. That function might even take the symbols-alist as argument and do the (setq-local prog-prettify-alist..) itself, so major modes can just call (prog-prettify '(("=3D>" . ?=E2=87=92))). Stefan