From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Obsolete variable in cc-defs.el Date: Tue, 18 Oct 2022 08:26:44 +0000 Message-ID: References: <875ygihlm3.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3984"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 18 10:40:22 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oki98-0000pG-HT for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Oct 2022 10:40:22 +0200 Original-Received: from localhost ([::1]:55222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oki97-0002s6-4L for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Oct 2022 04:40:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okhwL-0005a7-Po for emacs-devel@gnu.org; Tue, 18 Oct 2022 04:27:09 -0400 Original-Received: from mx3.muc.de ([193.149.48.5]:14967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okhwI-00021c-Hp for emacs-devel@gnu.org; Tue, 18 Oct 2022 04:27:08 -0400 Original-Received: (qmail 65477 invoked by uid 3782); 18 Oct 2022 10:26:47 +0200 Original-Received: from acm.muc.de (p4fe15b73.dip0.t-ipconnect.de [79.225.91.115]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 18 Oct 2022 10:26:47 +0200 Original-Received: (qmail 4633 invoked by uid 1000); 18 Oct 2022 08:26:44 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.5; envelope-from=acm@muc.de; helo=mx3.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:298020 Archived-At: 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).