help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Colour Capital Letters


From: Marcin Borkowski
Subject: Re: Colour Capital Letters
Date: Wed, 18 Oct 2023 20:58:57 +0200
User-agent: mu4e 1.1.0; emacs 30.0.50

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...

Best,

-- 
Marcin Borkowski
http://mbork.pl



reply via email to

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