|
From: | Eli Daniel |
Subject: | Re: [h-e-w] make cursor invisible |
Date: | Tue, 10 May 2005 21:49:33 -0400 |
You can easily make it into a 1 pixel wide bar instead of a box by setting the cursor-type frame parameter to (box . 1). Making it disappear entirely is trickier. I wrote a blinking cursor mode before it was a standard part of emacs... for that, I just set the cursor to a color very, very similar to the background color. My recollection is that if you actually set the cursor color to the same as the background color, emacs is smart enough to make it black instead.
Here's some dead code from said blinking-cursor mode. I hope it's helpful.
(defun w32-close-color (color)
"Get a color very close to the specified one"
(let* ((values (mapcar '(lambda (x) (/ x 257)) (x-color-values color)))
(newvalues (mapcar '(lambda (x) (max (1- x) 0)) values))
(newcolor (concat "almost " color)))
(apply 'w32-define-rgb-color (append newvalues `(,newcolor)))
newcolor))
You should then be able to then do something like
(set-cursor-color (w32-close-color (frame-parameter (selected-frame) 'background-color)))
-Eli
[Prev in Thread] | Current Thread | [Next in Thread] |