[Top][All Lists]

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

Re: [h-e-w] make cursor invisible

From: Eli Daniel
Subject: Re: [h-e-w] make cursor invisible
Date: Tue, 10 May 2005 21:47:14 -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)))

You should then be able to then do something like

(set-cursor-color (w32-close-color (frame-parameter (selected-frame) 'background-color)))


On 5/10/05, Lance Johnston <address@hidden> wrote:
Hi all,

I'm writing some elisp functions and have a need to temporarily turn off
the cursor (or make it invisible). Does anyone know how (or if) this is


reply via email to

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