Sven Joachim <[EMAIL PROTECTED]> wrote:

> Peter S Galbraith wrote:
> > Weird that this happens simply by loading the code.  Any idea what's
> > happening ?
> 
> Yes. :-) I tried to explain it already in my original report, but may
> not have been clear enough.  Take the following steps to get a
> backtrace in emacs-snapshot[1]:
> 
> M-x debug-on-entry RET modify-frame-parameters RET
> M-x load-library RET bar-cursor.el RET[2]
> 
> This gave me the following backtrace:
> 

[cut]
>    bar-cursor-set-cursor-type(block nil)
[cut]
>    (defcustom bar-cursor-mode nil
[cut]

> That's pretty much crystal-clear for an Emacs Lisp wizard. ;-)

Yup.
 
> I would prefer the following patch to work around this problem (please
> test with XEmacs, I don't have it):
> 
> --------------------------------------<-8------------------
> --- bar-cursor.el.orig        2005-09-24 12:56:56.000000000 +0200
> +++ bar-cursor.el     2005-10-07 19:28:30.000000000 +0200
> @@ -184,7 +184,7 @@
>   if not passed in."
>     (if (and bar-cursor-mode (not overwrite-mode))
>         (bar-cursor-set-cursor-type 'bar frame)
> -     (bar-cursor-set-cursor-type 'block frame)))
> +     (bar-cursor-set-cursor-type 'box frame)))

Will do.

> But it should be noted that bar-cursor.el is at least half-broken anyway,
> even for Emacs 21.  If the user prefers a different cursor than a box
> cursor, loading bar-cursor might change it.

Now that you mention it, you're absolutely right.

It should not activate all those advices and hooks simply by loading the
code.  There should be a function to setup and another to undo.  The
:set call in the customize should only do anything if setting to or from
a non-nil value, and then the steps should include the setup or the
undo.

But for now I'll start by appling your patch after testing it on XEmacs.
Thanks!

Peter


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to