emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Run hook when variable is set


From: David Kastrup
Subject: Re: [PATCH] Run hook when variable is set
Date: Sun, 01 Feb 2015 09:58:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> For the same reason I want to kill the `intangible' text-property:
>>> this operates at too-low a level, so it's bound to introduce buggy
>>> interactions between unsuspecting packages.
>> So what is now the best way to achieve the same effects/behaviours as
>> the 'intangible' text-property?
>
> You can use a post-command-hook or pre-redisplay-function, for example.
>
> We already have code to do those kinds of things for properties such as
> `invisible' (run right after post-command-hook, under the control of
> disable-point-adjustment) and we should extend it for a new property,
> which we could call `cursor-intangible'.

The cursor does not "tangle" anything anyway.  It's more like a
"no-parking" or "get-off-my" property.

> Exactly: like 99.99% of all uses of `intangible', you use it to affect
> cursor motion, i.e. motion at the command level, whereas intangible
> affects motion at the function level (i.e. motions that happen within
> commands, sometimes thousands of such motions within a single command,
> some of those motions may happen in different buffers).

preview-latex (part of AUCTeX) implements such machinery.  Some of it
probably is no longer strictly necessary as Emacs has gained some more
automatic move-out semantics since early Emacs-21.  But it may well be
needed as fallback for XEmacs.

-- 
David Kastrup



reply via email to

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