From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: changing cursor color depending on input method
Date: Thu, 19 Feb 2004 10:07:26 -0700 [thread overview]
Message-ID: <4034ED4E.9060603@yahoo.com> (raw)
In-Reply-To: pan.2004.02.15.11.58.40.335708@mccme.ru
Alexander Verbovetsky wrote:
> 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
Well, you explicitly check whether the selected window is a minibuffer window.
What happens if you leave that test out?
> 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.
--
Kevin Rodgers
next prev parent reply other threads:[~2004-02-19 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-15 11:58 changing cursor color depending on input method Alexander Verbovetsky
2004-02-19 17:07 ` Kevin Rodgers [this message]
2004-02-19 18:38 ` Alexander Verbovetsky
2004-02-20 17:21 ` Alexander Verbovetsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4034ED4E.9060603@yahoo.com \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).