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: Tue, 04 Jun 2013 13:20:28 -0400 Message-ID: References: <83li7ocdkb.fsf@gnu.org> <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> 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 1370366444 17828 80.91.229.3 (4 Jun 2013 17:20:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Jun 2013 17:20:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 04 19:20:44 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 1Ujuua-0000v3-Dm for ged-emacs-devel@m.gmane.org; Tue, 04 Jun 2013 19:20:44 +0200 Original-Received: from localhost ([::1]:56120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ujuua-0003L0-0W for ged-emacs-devel@m.gmane.org; Tue, 04 Jun 2013 13:20:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjuuR-0003Kp-0o for emacs-devel@gnu.org; Tue, 04 Jun 2013 13:20:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjuuL-0006ws-Gg for emacs-devel@gnu.org; Tue, 04 Jun 2013 13:20:34 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:48983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjuuL-0006wV-CO for emacs-devel@gnu.org; Tue, 04 Jun 2013 13:20:29 -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 r54HKSTn028372; Tue, 4 Jun 2013 13:20:28 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 773BBB431A; Tue, 4 Jun 2013 13:20:28 -0400 (EDT) In-Reply-To: <87sj0y4p7h.fsf@lifelogs.com> (Ted Zlatanov's message of "Mon, 03 Jun 2013 21:52:34 -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 RV4599=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4599> : streams <973975> : uri <1438355> 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:160080 Archived-At: > It's easy to do this once you start doing it but it still feels like > an annoying amount of work. We definitely need to add some helper functions to make it easier. The major modes should really only need to do (setq-local prog-prettify-symbols-alist ) and then (prog-prettify-setup-font-lock) but we'll figure that out later. =20=20 > I couldn't move the code to prog-mode.el. Fine. > The emacs-lisp-mode include needs the prog-mode map and barfed all > over. Sorry. But it should be OK otherwise. prog-mode.el needs to be preloaded (i.e. added to loadup.el), indeed. > +;; used to add font-lock keywords dynamically Please capitalize and punctuate your comments. > +(defconst lisp--prettify-symbols-alist > + `(("lambda" . ,(make-char 'greek-iso8859-7 107)))) We'd probably want to refine it so it's only prettified when it comes right after a parenthesis, but it's OK for now. OTOH using make-char here is a bad idea: better just put the Unicode char in there (this make-char seems to be copied from old pre-Unicode code) either as ?=CE=BB or as ?\u03BB. > + ("bundle agent" . ?=E2=8A=95) > + ("bundle server" . ?=E2=88=91) > + ("body" . ?=E2=8A=99) > + ("bundle" . ?=F0=9D=9B=BD))) Interesting! Stefan