[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: |
Sat, 01 Jun 2013 10:47:04 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> 1) move `perl--prettify-symbols-alist' and the functions for it,
> `perl--font-lock-compose-symbol' and `perl--font-lock-symbols-keywords'
> to simple.el (with the "prog-" prefix).
You might like to consider the pretty-lambda for Lisp as well as the
sml-font-lock-symbols in elpa/packages/sml-mode/sml-mode.el.
[ There are others out there for, e.g. for Hasekll-mode. ]
> 2) declare `perl-prettify-symbols' obsolete in favor of the alist
> `prog-prettify-symbols'.
No need for such obsolescence declaration, since it's never been in any
released version.
> I gave `prog-prettify-symbols' two default choices:
> `prog--prettify-symbols-alist-basic' (just -> => ::) and
> `prog--prettify-symbols-alist-extended' (basic plus much more). It can
> also be a free-form alist with key=string, value=character. I expect
> programming modes will need to augment this list somehow, but I'd like
> the user to simply say "I want basics or extended" instead of having to
> select individual glyphs for every language. Maybe the choice should be
> between :basic and :extended as symbols? Ideas welcome.
In my experience, every major mode might want to provide its own list.
> The patch grows simple.el. Perhaps it should live in prog.el or
> prettify.el. prog.el seems more sensible.
I think prog-mode.el is in order, yes.
> I also wonder if it's possible to add the prettify support at the
> `prog-mode' level, so each mode doesn't have to explicitly inline
> those keywords.
That would be nice, indeed. But I fear it's going to be tricky to make
it work right, so let's keep it for later.
> Unfortunately my font-lock-fu is not good, so I'd really appreciate help
> with the last two issues. I spent a few hours on them but couldn't work
> them out.
I don't have much time to devote right now, but the current problem is
probably a minor oversight.
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 <=
- 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, 2013/06/04
- 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