[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using glyphs by default in perl-mode
From: |
Stefan Monnier |
Subject: |
Re: using glyphs by default in perl-mode |
Date: |
Tue, 04 Jun 2013 13:20:28 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> 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 <blabla>)
and then
(prog-prettify-setup-font-lock)
but we'll figure that out later.
> 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 ?λ
or as ?\u03BB.
> + ("bundle agent" . ?⊕)
> + ("bundle server" . ?∑)
> + ("body" . ?⊙)
> + ("bundle" . ?𝛽)))
Interesting!
Stefan
- Re: using glyphs by default in perl-mode, Dan Nicolaescu, 2013/06/01
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/01
- Re: using glyphs by default in perl-mode, Stefan Monnier, 2013/06/01
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/02
- Re: using glyphs by default in perl-mode, Stefan Monnier, 2013/06/02
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/02
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/02
- Re: using glyphs by default in perl-mode, Stefan Monnier, 2013/06/03
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/03
- Re: using glyphs by default in perl-mode, Davis Herring, 2013/06/04
- Re: using glyphs by default in perl-mode,
Stefan Monnier <=
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/04
- Re: using glyphs by default in perl-mode, Stefan Monnier, 2013/06/04
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/05
- Re: using glyphs by default in perl-mode, Stefan Monnier, 2013/06/05
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/05
- Re: using glyphs by default in perl-mode, joakim, 2013/06/05
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/05
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/05
- Re: using glyphs by default in perl-mode, Stefan Monnier, 2013/06/05
- Re: using glyphs by default in perl-mode, Ted Zlatanov, 2013/06/05