From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Indentation of def* Date: Wed, 27 Oct 2021 10:36:09 -0400 Message-ID: References: <878ryw1ptl.fsf@gnus.org> <87czo2lq0d.fsf@gnus.org> <87v91s876d.fsf@gnus.org> <87ee8gnlar.fsf@gnus.org> <87bl3ea76o.fsf@gnus.org> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26745"; mail-complaints-to="usenet@ciao.gmane.io" Cc: joaotavora@gmail.com, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 27 17:36:16 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 1mfkyN-0006fN-SH for ged-emacs-devel@m.gmane-mx.org; Wed, 27 Oct 2021 17:36:16 +0200 Original-Received: from localhost ([::1]:37438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mfkyL-00007k-Ux for ged-emacs-devel@m.gmane-mx.org; Wed, 27 Oct 2021 11:36:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfk2I-0007bv-RT for emacs-devel@gnu.org; Wed, 27 Oct 2021 10:36:14 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mfk2E-0001WD-6n; Wed, 27 Oct 2021 10:36:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=1j6BjXFZfdAC/qkQ2OM1GYmAWDWxnXmvIULPyfJ7UHg=; b=XLE138XVBqr2 Pwn9iWx/leS09u1iEOOkQ5GHFglGxZxpamkAGSt6jlCZ20jJ0z9S7N0NwHDN/y9M+goAlCDNmiZ4j pYNU/2wKhrz9hjGOlcz85cL4pjg0wnfErNk5UUnUmfSPVObzQWnJoNlbNerwOiwF+/30iV9duXkp+ VXy9UysxdF17u5NHWH6XXg9Yye6Nk8OQixfHRkOww9etb1DH88QAXLAtOlBfESuytdSQ9aPOHgvEe oOgeNZS9j9SyI57ocBeuk3Nfp0w4hvL2MRyhyGtU3Ct+qCFIuRcvlh8W2lUWDO+ZsSQW862AbH6v3 LjeYDbKW93UlZllzaxb4eg==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1mfk2D-0002ci-IM; Wed, 27 Oct 2021 10:36:09 -0400 In-Reply-To: <87bl3ea76o.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 24 Oct 2021 15:22:39 +0200) 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:277984 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] (let ((not-default 'bar) (default 'foo)) ) (default 'foo) is not a call to the function `default'. It's a list which is not an expression. The bug here is that the indentation of that list pays attention to something about `default'. The same problem occurs with explicit indentation specs: (let ((defun foo) (defmacro bar) ) ) The fix would be to make indentation understand the structure of a binding list. That might be nontrivial work, but it would make a bigger improvement in the indentation. > The introduction of the `with-*' macros, added three decades ago without > any such heuristic, shows that these heuristics aren't necessary (or > useful). It does show something. I think it shows that if we introduce a category of macros without any special heuristic for them, the absence won't draw much in the way of complaints. But it doesn't show that we are better off not introducing the heuristic, nor that it is wise to delete such a heuristic if we have been accustomed to using one. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)