From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: Obsolete variable in cc-defs.el
Date: Tue, 18 Oct 2022 08:26:44 +0000 [thread overview]
Message-ID: <Y05jRASTRTpj1wTp@ACM> (raw)
In-Reply-To: <jwvzgduazp6.fsf-monnier+emacs@gnu.org>
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).
next prev parent reply other threads:[~2022-10-18 8:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 8:59 Obsolete variable in cc-defs.el Lars Ingebrigtsen
2022-10-17 16:53 ` Alan Mackenzie
2022-10-17 21:54 ` Stefan Monnier
2022-10-18 8:26 ` Alan Mackenzie [this message]
2022-10-17 21:59 ` Stefan Monnier
2022-10-18 9:30 ` Alan Mackenzie
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y05jRASTRTpj1wTp@ACM \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).