all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Mackenzie <acm@muc.de>
Cc: Richard Stallman <rms@gnu.org>, emacs-devel@gnu.org
Subject: Re: What primitive has moved point?
Date: Fri, 06 Nov 2009 10:36:05 -0500	[thread overview]
Message-ID: <jwvfx8rzn1y.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20091106114853.GA1917@muc.de> (Alan Mackenzie's message of "Fri,  6 Nov 2009 11:48:53 +0000")

> After point has been moved, how can I determine exactly which primitive
> did the moving?

Down this path lies madness.

> (possibly by the use of point-entered/left text properties),

...more madness.

> However, if the user gets to brace B with forward-line (e.g., with C-p)
> I want to leave point well alone.

I think your "feature" will be a misfeature, but if you really really
want to implement it, the sanest way is probably to consider not the
primitive used, but the direction of the movement: remember point in
pre-command-hook, and compare in post-command-hook.  Otherwise: wrap all
the relevant primitives (via defadvice, for example) and make them do
what you want.


        Stefan




  reply	other threads:[~2009-11-06 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-06 11:48 What primitive has moved point? Alan Mackenzie
2009-11-06 15:36 ` Stefan Monnier [this message]
2009-11-07 13:25   ` Alan Mackenzie
2009-11-08  2:48     ` Stefan Monnier
2009-11-17 23:56       ` Alan Mackenzie
2009-11-07 12:39 ` Richard Stallman

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=jwvfx8rzn1y.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=rms@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.