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: Christopher Dimech
Subject: Re: prettify-symbols-mode to handle "\alpha-\beta" ...
Date: Fri, 5 Feb 2021 22:54:31 +0100

> Sent: Saturday, February 06, 2021 at 9:05 AM
> From: "Christopher Dimech" <dimech@gmx.com>
> To: "Stefan Monnier" <monnier@iro.umontreal.ca>
> Cc: "Óscar Fuentes" <ofv@wanadoo.es>, emacs-devel@gnu.org
> Subject: Re: prettify-symbols-mode to handle "\alpha-\beta" ...
>
> > Sent: Saturday, February 06, 2021 at 9:01 AM
> > From: "Stefan Monnier" <monnier@iro.umontreal.ca>
> > To: pietru@caramail.com
> > Cc: "Óscar Fuentes" <ofv@wanadoo.es>, emacs-devel@gnu.org
> > Subject: Re: prettify-symbols-mode to handle "\alpha-\beta" ...
> >
> > > 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.

Perhaps the predicate function 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 the alist.

(split-string "\\alpha-\\beta" "-")
=> ("\\alpha" "\\beta")

Still, do people think that that prog-mode should also work with regexp
and what would the benefits be.




reply via email to

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