[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Including tex commands in a list
From: |
steve-humphreys |
Subject: |
Re: Including tex commands in a list |
Date: |
Thu, 28 Jan 2021 22:50:59 +0100 |
Had made it as you suggested, but I think there has to be some changes
that have to be done in the regexp.
Have used
(defconst crucible-mtksy-keywords
`(;; Greek
(,(rx "\\" word-start
(or "alpha" "beta") ;add the other letters here
word-end)
(0 'crucible-mtksy-tfc))) )
In the expression (1 'crucible-mtksy-tfc), the "1" is an option to not
highlight the starting "\".
> Sent: Friday, January 29, 2021 at 9:19 AM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Including tex commands in a list
>
> steve-humphreys@gmx.com writes:
>
> > I am using font lock to highlight keywords in a minor mode.
> > Have changed from using "concat" to using "rx" as you suggested.
> > However it does not seem equivalent.
> >
> > (defconst crucible-mtksy-keywords
> > `(;; Greek
> > (,(concat "\\\\\\<\\(alpha\\|beta\\|chi\\|delta\\|"
> > "Delta\\|epsilon\\|varepsilon\\|eta\\|"
> > "gamma\\|Gamma\\|iota\\|kappa \\|"
> > "lambda\\|Lambda\\|mu\\|nu\\|"
> > "omega\\|Omega\\|phi\\|varphi\\|"
> > "Phi\\|pi\\|varpi\\|Pi\\|"
> > "psi\\|Psi\\|rho\\|varrho\\|"
> > "sigma\\|varsigma\\|Sigma\\|tau\\|"
> > "theta\\|vartheta\\|Theta\\|upsilon\\|"
> > "Upsilon\\|xi\\|Xi\\|zeta\\)\\>")
> > (0 'crucible-mtksy-tfc)))
> > "Fontification for letters and symbols.")
>
> How does your rx version look like?
>
> Michael.
>
>
>
- Including tex commands in a list, steve-humphreys, 2021/01/26
- Re: Including tex commands in a list, Michael Heerdegen, 2021/01/27
- Re: Including tex commands in a list, steve-humphreys, 2021/01/28
- Re: Including tex commands in a list, Michael Heerdegen, 2021/01/28
- Re: Including tex commands in a list, steve-humphreys, 2021/01/28
- Re: Including tex commands in a list, Michael Heerdegen, 2021/01/28
- Re: Including tex commands in a list,
steve-humphreys <=
- Re: Including tex commands in a list, steve-humphreys, 2021/01/28
- Re: Including tex commands in a list, Christopher Dimech, 2021/01/28
- Re: Including tex commands in a list, steve-humphreys, 2021/01/28
- Re: Including tex commands in a list, steve-humphreys, 2021/01/28
- Re: Including tex commands in a list, Michael Heerdegen, 2021/01/29
- Re: Including tex commands in a list, steve-humphreys, 2021/01/29
- Re: Including tex commands in a list, Michael Heerdegen, 2021/01/29
- Re: Including tex commands in a list, steve-humphreys, 2021/01/29
- Re: Including tex commands in a list, Michael Heerdegen, 2021/01/29
- Re: Including tex commands in a list, steve-humphreys, 2021/01/29