[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Narrow cursor at end of line?
From: |
Adam Sjøgren |
Subject: |
Re: Narrow cursor at end of line? |
Date: |
Sat, 09 Jan 2010 22:04:32 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) XEmacs/21.5-b29 (linux) |
On Sat, 09 Jan 2010 21:26:02 +0100, Pascal wrote:
> asjo@koldfront.dk (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...
Best regards,
Adam
--
"I'm a driver, I'm a winner, things are gonna change, Adam Sjøgren
I can feel it." asjo@koldfront.dk