From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.devel Subject: Re: 2a73673 Change how thread-first/thread-last indent the first argument Date: Wed, 06 Oct 2021 05:49:15 -0500 Message-ID: <87k0iqv36c.fsf@alphapapa.net> References: <87ee90vtye.fsf@alphapapa.net> <87czoj7wlk.fsf@gnus.org> <875yubx3rj.fsf@alphapapa.net> <87bl42frku.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="13930"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 06 12:50:48 2021 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 1mY4Vc-0003Pz-3c for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Oct 2021 12:50:48 +0200 Original-Received: from localhost ([::1]:60432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mY4Va-0004M4-A0 for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Oct 2021 06:50:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mY4UM-0003bD-2R for emacs-devel@gnu.org; Wed, 06 Oct 2021 06:49:30 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:59876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mY4UK-00064V-5r for emacs-devel@gnu.org; Wed, 06 Oct 2021 06:49:29 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mY4UG-0001Yq-N5 for emacs-devel@gnu.org; Wed, 06 Oct 2021 12:49:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:276419 Archived-At: Lars Ingebrigtsen writes: > That's true of any indentation change, but we do make those, anyway. In > Emacs 28 we changed how > > '( foo > bar) > > is indented I would argue that that's introducing a new feature rather than changing how an existing form is indented, because such a form with a space before the first element didn't indent differently than one without a space, so there was no reason to write a form that way before this change. > and in Emacs 29 we've changed how cl-flet is indented. > (The first change probably didn't entail any churn because nobody wrote > something like that before, but the cl-flet one does introduce churn.) Yes, but that's fixing a longstanding bug, a clear incompatibility with CL, and the unfixed cl-flet indentation is purely a drawback (causing too-long lines where they'd otherwise be within fill-column). > So the question is whether the old indentation was a bug or not, and it > looks like a bug to me. That is, the only documentation of the form we > have indents the way it does now (after the change). On the other hand, > the documentation could be incorrect. Looking at vc-region-history for thread-last, it's only been touched 3 times: most recently in this indentation change, then in 2014 when Paul Eggert fixed a typo in the docstring, and firstly in the same year when Fabián Ezequiel Gallina introduced the macro. I would argue that Fabián wrote "(declare (indent 1))" intentionally, and the fact that the "5" in the docstring example was not indented by two more spaces was an oversight, probably explained by having manually indented the code in the docstring. So I would argue that the bug was in the example in the docstring, not in the code. And given that offsetting the first form is more useful, and that it's in line with other macros whose first form is special (e.g. `prog1'), the indentation for `thread-first' and `thread-last' should not be changed to match the erroneous docstring. It would be preferable to just fix the docstring.