help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Box cursor at EoL


From: Eli Zaretskii
Subject: Re: Box cursor at EoL
Date: Sat, 08 Oct 2022 12:12:08 +0300

> From: Dr Rainer Woitok <rainer.woitok@gmail.com>
> Date: Sat, 8 Oct 2022 11:03:13 +0200
> Cc: help-gnu-emacs@gnu.org
> 
> > >    (lambda () (while-no-input
> > >                  (set-frame-parameter nil               ; Current frame.
> > >                                       'cursor-type      ; Variable name.
> > >                                       (if (eolp) EoL-Cursor ; EoL value.
> > >                                                      Cursor ; Nrm value.
> > >    )          )  )                    )
> > > 
> > > That works in different frames,  but of course not  in different windows
> > > within the same frame.  However replacing function `set-frame-parameter´
> > > with `set-window-parameter´ prevented the hook function  from working at
> > > all, so `cursor-type´ doesn't seem to be a legal window parameter :-(
> > 
> > How do you access cursor-type when it is a window parameter?
> 
> Erm, I don't.  Emacs does (at least when I use `setq´ or `set-frame-par-
> ameter´).   I just specify which cursor I want to see in which situation
> and have Emacs do the rest.
> 
> But thinking twice,  my assumption regarding "`cursor-type´ doesn't seem
> to be a legal window parameter" might be wrong; it could as well be that
> Emacs just doesn't look there  for a cursor specification  and thus uses
> the default cursor all the time in that case.

Yes, you must explicitly access the values of window parameters via
the function window-parameter.  They aren't handled as frame
parameters are.



reply via email to

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