emacs-devel
[Top][All Lists]
Advanced

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

Re: prettify-symbols-mode to handle "\alpha-\beta" ...


From: Stefan Monnier
Subject: Re: prettify-symbols-mode to handle "\alpha-\beta" ...
Date: Fri, 05 Feb 2021 16:57:34 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> > Would allowing a regexp solve the expression \alpha-\beta,
>> > \alpha+\beta, \alpha/\beta, so that \alpha and \beta are
>> > prettified seperately?
>> I don't see how a regexp would help in those cases.
> We could somehow employ 'split-string', which will target hyphens (or
> whatever regexp of separators) and split every occurence of a composite
> as two separate strings which can then be checked separately for
> equality against alist.

It seems more complex and less efficient than the current solution
(which uses the non-regexp alist directly and then checks the context
using the predicate function to see if it's a valid occurrence).

I've been tempted to add support for regexps many times, but so far
I haven't found a use case for them ;-)
I suspect that they'll only make sense when we try to move further than
just "replace occurrences of this identifier with that character".


        Stefan




reply via email to

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