emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About prog-prettify-symbols


From: Tassilo Horn
Subject: Re: About prog-prettify-symbols
Date: Mon, 17 Jun 2013 11:40:53 +0200
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Ted Zlatanov <address@hidden> writes:

> TH>    But then I've tried to make it derive from prog-mode directly,
> TH>    and it's still messed up in the same respects.
>
> I don't know how to fix this, sorry.  I looked at the code and can't
> see where `clojure-mode' font-locking diverges from the other modes I
> tested.

No problem, I'll see what I can do when I find some time.

> TH> 2. Would it be possible to make prettification a bit more flexible?  For
> TH>    example, in clojure I'd like to display also (defn ...) as (deƒ ...),
> TH>    but currently it seems I can only "replace" a fixed symbol with a
> TH>    single character.  I think, it would be better if
> TH>    `prog-prettify-symbols-alist' would have the form
>
> TH>      ((REGEX GROUP CHAR) ...)
>
> TH>    so that I could have an alist like
>
> TH>      (("de\\(fn\\)" 1 ?ƒ)
> TH>       ("fn" 0 ?ƒ))
>
> TH>    to show (fn ...) as (ƒ ...) and (defn ...) as (deƒ ...).
>
> Juanma requested something similar, a string instead of a single
> character.  The string is much simpler than using the match data, you'd
> just give "deƒ" as the replacement.  I think mixing match data into the
> prettification rule makes it less user-friendly even though it's
> certainly more powerful.

I'd be fine with both approaches.

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]