From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 51f0ccc: Put follow-mode's engine on pre-redisplay-hook instead of post-command-hook Date: Wed, 03 Oct 2018 08:20:30 -0400 Message-ID: References: <20181003105358.19923.64797@vcs0.savannah.gnu.org> <20181003105359.AA7EC204E8@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1538569126 5769 195.159.176.226 (3 Oct 2018 12:18:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 3 Oct 2018 12:18:46 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 03 14:18:42 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g7g6x-0001LE-9r for ged-emacs-devel@m.gmane.org; Wed, 03 Oct 2018 14:18:39 +0200 Original-Received: from localhost ([::1]:48507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7g93-0002UU-Sh for ged-emacs-devel@m.gmane.org; Wed, 03 Oct 2018 08:20:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7g8s-0002TK-BU for emacs-devel@gnu.org; Wed, 03 Oct 2018 08:20:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7g8o-00046P-3G for emacs-devel@gnu.org; Wed, 03 Oct 2018 08:20:38 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:34047) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7g8n-00045r-Tx for emacs-devel@gnu.org; Wed, 03 Oct 2018 08:20:33 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w93CKVAM026742; Wed, 3 Oct 2018 08:20:31 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id ED6E967A92; Wed, 3 Oct 2018 08:20:30 -0400 (EDT) In-Reply-To: <20181003105359.AA7EC204E8@vcs0.savannah.gnu.org> (Alan Mackenzie's message of "Wed, 3 Oct 2018 06:53:59 -0400 (EDT)") X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 3 Rules triggered BODY_START_GREETING=0.1, EDT_SA_DN_PASS=0, RV6387=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6387> : inlines <6910> : streams <1800236> : uri <2723018> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230195 Archived-At: Hi Alan, > Put follow-mode's engine on pre-redisplay-hook instead of > post-command-hook Yay! > +(defun follow-pre-redisplay-function (wins) > + (if (or (eq wins t) > + (null wins) > + (and (listp wins) > + (memq (selected-window) wins))) > + (follow-post-command-hook))) I'm not sure it's possible for (selected-window) not to be memq of wins, but even if it is, it's likely to be extremely rare. So the above (or ...) is probably just a complicated way to say `t`. > +;; The magic little box. This function was formerly called after every > +;; command. It is now called before each redisplay operation (see > +;; `follow-pre-redisplay-function' above), and at the end of several > +;; search/replace commands. It retains its historical name. I wonder why this is still needed. Stefan