[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Colour Capital Letters
From: |
Heime |
Subject: |
Re: Colour Capital Letters |
Date: |
Wed, 18 Oct 2023 19:40:07 +0000 |
Sent with Proton Mail secure email.
------- Original Message -------
On Thursday, October 19th, 2023 at 6:58 AM, Marcin Borkowski <mbork@mbork.pl>
wrote:
> On 2023-10-02, at 03:58, Heime heimeborgia@protonmail.com wrote:
>
> > I want to make a stand alone function that uses a different colour for
> > capital letters
> > in CamelCase names. Possibly taking code from glasses.el.
> >
> > (defun color-camelcase-capital-letters ()
> > "Color capital letters in CamelCase variables."
> > (interactive)
> > (highlight-regexp "\\(?:^\\|\\b\\)[[:upper:]][[:lower:]]*" 'hi-yellow))
>
>
> Just saw this while looking through my email backlog. This is a great
> idea, but I think it can be made even better. How about using two
> colors so that subsequent /words/ in CamelCase identifiers are colored
> differently? I suspect this could be great for readibility!
>
> > What can I do ?
>
>
> Do you have any working code? I might be tempted to try to write
> something like this...
Do not have a working one yet. I wanted to start with something quite
simple first. But I was planning to get subsequent words colored differently.
The purpose was about readability, particularly for Latex where one cannot use
underscore '_'.
> Best,
>
> --
> Marcin Borkowski
> http://mbork.pl