From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Narrow cursor at end of line?
Date: Mon, 11 Jan 2010 11:46:28 -0500 [thread overview]
Message-ID: <jwv3a2ek5dx.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 87ocl3t2fz.fsf@topper.koldfront.dk
> (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.
Stefan
prev parent reply other threads:[~2010-01-11 16:46 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
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 [this message]
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=jwv3a2ek5dx.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--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.