[Top][All Lists]

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

Re: Narrow cursor at end of line?

From: Stefan Monnier
Subject: Re: Narrow cursor at end of line?
Date: Mon, 11 Jan 2010 11:46:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

>     (if (eq (point) (line-end-position))
>         (setq cursor-type '(bar . 6))
>       (setq cursor-type t)))

You mean

     (setq cursor-type (if (eolp) '(bar . 6) t))

> I would need a hook called every time point is moved (or any time it is
> moved to/from end of line) or add an advice to something, I guess?

Actually, it's only every time the cursor is moved (point can be moved
many times internally over the course of a single command).  I.e. at
every redisplay.  There is sadly no hook for that (yet?), but you can
use post-command-hook as a good first approximation.


reply via email to

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