unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* changing cursor color depending on input method
@ 2004-02-15 11:58 Alexander Verbovetsky
  2004-02-19 17:07 ` Kevin Rodgers
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Verbovetsky @ 2004-02-15 11:58 UTC (permalink / raw)


Hello,

I'm using Emacs to write mathematical texts in Russian,
so I often change input method with C-\

It is very convinient if the cursor change its color
when the input mode is activated.

Currently I have the following quick and dirty code
in my .emacs:
------------------------------
(add-hook 'input-method-activate-hook
          '(lambda ()
             (if (not (eq (selected-window) (minibuffer-window)))
                 (set-cursor-color "red"))))
(add-hook 'input-method-inactivate-hook
          '(lambda ()
             (if (not (eq (selected-window) (minibuffer-window)))
                 (set-cursor-color "black"))))
------------------------------
This works in 95%, but the color isn't changed when in the minibuffer
and goes wrong after "C-x C-f" (to repear I press C-\ twice).

Does a better way to do this exist?

What would be nice, IMO, is to have red cursor if next letter is
going to be non-latin and black otherwise, in all modes and regimes.

Thanks for the help.

Alex

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-02-20 17:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-15 11:58 changing cursor color depending on input method Alexander Verbovetsky
2004-02-19 17:07 ` Kevin Rodgers
2004-02-19 18:38   ` Alexander Verbovetsky
2004-02-20 17:21     ` Alexander Verbovetsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).