[Top][All Lists]

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

Re: Narrow cursor at end of line?

From: Pascal J. Bourguignon
Subject: Re: Narrow cursor at end of line?
Date: Sun, 10 Jan 2010 03:20:44 +0100
User-agent: Gnus/5.101 (Gnus v5.10.10) Emacs/22.3 (gnu/linux)

address@hidden (Adam Sjøgren) writes:

> On Sat, 09 Jan 2010 21:26:02 +0100, Pascal wrote:
>> address@hidden (Adam Sjøgren) writes:
>>> XEmacs indicates that point is at the end of a line by making the cursor
>>> slightly less wide. How do I make GNU Emacs do the same?
>> I guess you could change the cursor-type when it's at the end of line.
>> See the variable: cursor-type
> Ah, nice - thanks for the pointer.
> I guess what I want to do is to have cursor-type set to (bar . 6) at the
> end of the line and t otherwise. Perhaps something like:
>   (defun asjo-indicate-end-of-line ()
>     "Change the cursor to a narrow one when at the end of line"
>     (if (eq (point) (line-end-position))
>         (setq cursor-type '(bar . 6))
>       (setq cursor-type 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?
> I have looked though the list found with M-x apropos hook, but couldn't
> really a good candidate...

You can do that after a command is executed: post-command-hook

__Pascal Bourguignon__           

reply via email to

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