From: asjo@koldfront.dk (Adam Sjøgren)
To: help-gnu-emacs@gnu.org
Subject: Re: Narrow cursor at end of line?
Date: Sat, 09 Jan 2010 22:04:32 +0100 [thread overview]
Message-ID: <87ocl3t2fz.fsf@topper.koldfront.dk> (raw)
In-Reply-To: 871vhzqb39.fsf@hubble.informatimago.com
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
next prev parent reply other threads:[~2010-01-09 21:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-09 20:02 Narrow cursor at end of line? Adam Sjøgren
2010-01-09 20:26 ` Pascal J. Bourguignon
2010-01-09 21:04 ` Adam Sjøgren [this message]
2010-01-10 2:20 ` Pascal J. Bourguignon
2010-01-10 12:55 ` Adam Sjøgren
2010-01-10 6:47 ` Lennart Borgman
2010-01-11 16:46 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ocl3t2fz.fsf@topper.koldfront.dk \
--to=asjo@koldfront.dk \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.