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

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

RE: Color of the cursor


From: Drew Adams
Subject: RE: Color of the cursor
Date: Mon, 22 Feb 2010 06:47:12 -0800

> I would like to change the color of the cursor (or of the 
> current line) depending on whether caps lock is on or not.
> 
> Someone knows or can give a hint how to do that (my lisp 
> knowledge is zero)?

1. For code changing the cursor color under some condition (in your case,
whether caps-lock is on), see
http://www.emacswiki.org/emacs/ChangingCursorDynamically.

You just need to specify the condition caps-lock-is-on in Lisp (can't help with
that), then use the existing code as a model. The existing code uses other
conditions, but it does the same thing.

2. For changing the face of the current line (i.e. highlighting it in a color
you choose), see http://www.emacswiki.org/emacs/HighlightCurrentLine and
customize face `hl-line'.

3. If you are doing this to easily locate the cursor position, then you might
want to highlight both line and column. For that, see
http://www.emacswiki.org/emacs/CrosshairHighlighting.





reply via email to

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