From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#65063: 30.0.50; Macro indentation in emacs-lisp-mode when the macro definition is not yet loaded Date: Sat, 05 Aug 2023 06:29:05 +0000 Message-ID: <871qgi0zpq.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22818"; mail-complaints-to="usenet@ciao.gmane.io" To: 65063@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 05 08:29:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qSAmp-0005jn-Jv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Aug 2023 08:29:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSAmi-0000ir-SW; Sat, 05 Aug 2023 02:29:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSAmc-0000ia-WD for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 02:29:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qSAmc-0007dZ-4y for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 02:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qSAmb-0000zw-W2 for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 02:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Aug 2023 06:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65063 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16912169413827 (code B ref -1); Sat, 05 Aug 2023 06:29:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Aug 2023 06:29:01 +0000 Original-Received: from localhost ([127.0.0.1]:55250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSAma-0000zf-Fc for submit@debbugs.gnu.org; Sat, 05 Aug 2023 02:29:00 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:58472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSAmW-0000zM-0G for submit@debbugs.gnu.org; Sat, 05 Aug 2023 02:28:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSAmQ-0000gm-JM for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 02:28:50 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSAmM-0007dB-Hk for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 02:28:50 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4DE2C240029 for ; Sat, 5 Aug 2023 08:28:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1691216924; bh=MFgLPyjJBx764bOp53gbi0gILPIkeLbxinkD+cFDv1k=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=VJIWH4reb836gwYwCNHXgUN6F0ZP6i+puqQLZFOsNG7NwBboF5cD7LURyC5pP8Cu4 vVH7GH6gFGbTCdQinvKnVmP+1Leq1yHcDakGb2uaKHKjL+PSw6BlpQWIDx1Cub91tk NIaS7vrJUqtM89zBCJ9786g5garVP94mbjNk5QNfSZ717WZDPvygXLTbMis8kkl7FU sYHkK4ZKWxjlogLbIYvbFEaTbcMLHqaOhpc0kUJELLOROsUx/S5wgoqLI0Mdstj8gb yFRJmUGZc7cvPqS+58gMR97VtHwNfGq6WVLcEZ1bEqj/7pfyIp9Sp9fAj3INI/aSu4 03KM08H+sMLXw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RHt2M57d9z9rxG for ; Sat, 5 Aug 2023 08:28:43 +0200 (CEST) Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266729 Archived-At: Consider the following: 1. File yant-test.el (defmacro yant/test (param &rest body) "" (declare (indent 1)) `(let ((foo ,param)) ,@body)) (provide 'yant-test) 2. Put this file into the load-path, but do not load. 3. File yant-test2.el (require 'yant-test) (yant/test 1 (+ 1 2)) In the above file, M-x indent-region on the macro call will yield the above, incorrect, indentation. Expected: (yant/test 1 (+ 1 2)) I am not sure if there is a clean solution to this problem, but it has been bugging me for quite some time now, especially when I use aggressive-indent-mode that messes up indentation in the whole file in such scenario. In GNU Emacs 30.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-08-04 built on localhost Repository revision: ce48073f1597ceecb82800e71c89b53badc9f9d0 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: Gentoo Linux -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at