Subject: bug#19145: 24.4; prettify-symbols-mode inconsistent behavior

From: Stefan Monnier <[email-masked]>
Date: Mon, 24 Nov 2014 09:53:43 -0500

>> So, is this setting correct (i.e. does your language treat "delta_x"
>> as a single identifier, and you're trying to prettify subparts of
>> identifiers)?
> I'm not sure. I'm just using python and elpy (and therefore
> python-mode).

Duh!  Sorry, I somehow failed to see "python-mode" in your original
bug report.  So yes, you're trying to prettify subparts of identifiers,
and prettify-symbols-mode currently provides no support at all for that.

> that everything is working as it should, and I'm just running into an
> edge case that can only be covered by a more complex implementation that
> uses regexes?

Exactly.

for _x and **2, I think prettify-symbols-mode is probably not a good
solution anyway (because it won't extend to _xy or to **24).  You'd be
better off with a font-lock rule which just shifts the text up/down (you
might like to look at the way we do just that in text-mode.el), which
can work with any sequence of character rather than being limited to
those few characters which have a "superscript" form in Unicode.

But w.r.t "delta" in "delta_x" it would make a lot of sense for
prettify-symbols-mode to provide support for that.

        Stefan