emacs-devel
[Top][All Lists]
Advanced

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

Re: Obsolete variable in cc-defs.el


From: Alan Mackenzie
Subject: Re: Obsolete variable in cc-defs.el
Date: Tue, 18 Oct 2022 08:26:44 +0000

Hello, Stefan.

On Mon, Oct 17, 2022 at 17:54:12 -0400, Stefan Monnier wrote:
> > That is a mistake in declaring inhibit-point-motion-hooks obsolete.
> > As long as the properties point_entered and point_left exist and
> > work (regardless of whether they are declared obsolete),
> > inhibit-point-motion-hooks is required.  It's use shouldn't (yet)
> > generate any warnings.

> You don't need to let-bind it to t in Emacs≥25 because its default
> value is already t.  So for Emacs≥25 you should simply remove that
> let-binding.

I do need to bind it.  Some obscure minor mode might have set it to nil.
As I said above, until point-entered and point-left have been removed
from Emacs, one needs to bind that variable, just to be safe.  Therefore
it shouldn't yet be marked as obsolete.

> > It's obsolesence message is also suboptimal.

> Indeed: it is meant for the case where you set or let-bind that
> variable to nil rather than when you set/bind it to t.

Yes.

> > That role will be fulfilled by the variable cursor-sensor-inhibit,
> > which really ought to be in c-save-buffer-state (in cc-defs.el)
> > alongside i-p-m-h.

> You don't need it there and let-binding it there would have no effect at
> all unless the body of `c-save-buffer-state` does things like run
> a recursive-edit or pause for redisplay (that var is only consulted
> "outside", e.g. from `post/pre-command-hook` or
> `pre-redisplay-functions`).

OK, those properties are only for display purposes, not for Lisp code.
What about font-locking?  Presumably the cursor-intangible property will
not mess up font-locking, and is only taken into account when redisplay
moves point to outside of such a region.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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