GNU bug report logs - #27646
Bug: Emacs Lisp Indentation

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Alexander Shukaev <emacs@HIDDEN>; merged with #21922; dated Mon, 10 Jul 2017 20:07:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 21922 27646. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Removed tag(s) unreproducible and moreinfo. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 27646 <at> debbugs.gnu.org:


Received: (at 27646) by debbugs.gnu.org; 17 Jan 2020 17:59:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 17 12:59:00 2020
Received: from localhost ([127.0.0.1]:40104 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1isVta-0006cX-LK
	for submit <at> debbugs.gnu.org; Fri, 17 Jan 2020 12:59:00 -0500
Received: from mail-qv1-f52.google.com ([209.85.219.52]:41929)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>)
 id 1isVtU-0006cB-I4; Fri, 17 Jan 2020 12:58:55 -0500
Received: by mail-qv1-f52.google.com with SMTP id x1so11095340qvr.8;
 Fri, 17 Jan 2020 09:58:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=ReWqjkAcO+ir7WPnrcmupn3isaqCmc0N5clBs1auyh4=;
 b=jrHgbUGgoR1kbh5rqaNqG5chZAIHJ6CmF9Ze2L2n57r53PUoq0uq7IDrz9t+O6GWoA
 Zn1fpiMWIr6y0XYUKj8MiggVRvflUfjnaKMySaU0uB/IXevOC9pymymH3P0yBkonl969
 MnG1aBeEAPhHyMpHBGZAqY7fpNaCusIHkW2KP0sv4yGY4um8qK/2ofVsmz8qijKA2Yow
 8L9wJs7b9tw8A2A2KtjhWFIp8hGobK+K6JcoEoxsBjbPIulW482ZvnTvM/hF5/tK/x26
 ISY6MNdcR24vVinzod6lROL2VD0BE2P2SdxTCIIQr5UgUQX+64ck4S4KUh6qzCBQT95T
 +FFQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=ReWqjkAcO+ir7WPnrcmupn3isaqCmc0N5clBs1auyh4=;
 b=NUu0ZrEaa/9ONoX7N6rLVByqP3MICO8rrRRstuQWqgvxC3q5KUVhHpPay2Hy5f0SsK
 QjhiBHtHoum3//jrnc+X0VZrx5Sej40QlU6vQT25h6TcYnEBNq0YxLUgO3e3V2XIkiiC
 BA0wlsqmASKpD1xTpLnzgu2wUcZk0HN0zpUnOb7hnNKcUEUp3LXstoPDzpzQEuEScAni
 Lmk9WwA3Logx9NG3JG6lFtd0yxaH84AV9/7nkYBXFDUDvZZ8Ytpaw8uHgK2OBu3s50kn
 IHoMCxbjgYg1kz2jZwazexneNZ0gzCN0++0oGQm78zqKlh57zj58nJ0rbwHUn6GOAEjg
 KGsA==
X-Gm-Message-State: APjAAAXTFJVpbabWpzkZTz13bM5vx3uNVKO5ffRk9wOqA8bqRr8S52z1
 as3CHO3h+opS9IWN7p3n/ClNczHn
X-Google-Smtp-Source: APXvYqzJfeABb7MN45GlvPgBS24NoSJgPOpVrhtkmnzVM65SDc3O+zrJGJNhpNXOF1uqPHzRjCTXKA==
X-Received: by 2002:a0c:e80e:: with SMTP id y14mr9012431qvn.139.1579283926654; 
 Fri, 17 Jan 2020 09:58:46 -0800 (PST)
Received: from vhost2
 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42])
 by smtp.gmail.com with ESMTPSA id 65sm13262722qtf.95.2020.01.17.09.58.45
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Fri, 17 Jan 2020 09:58:46 -0800 (PST)
From: Noam Postavsky <npostavs@HIDDEN>
To: Alexander Shukaev <emacs@HIDDEN>
Subject: Re: bug#27646: Bug: Emacs Lisp Indentation
References: <c88b111b-58e5-4bce-9b63-ca5c3ee2ab6f@HIDDEN>
 <87o9srg4uj.fsf@HIDDEN>
 <87h8tdlt15.fsf@HIDDEN>
 <3288253b-d9cf-ab24-a9d7-26187d0a5de0@HIDDEN>
Date: Fri, 17 Jan 2020 12:58:44 -0500
In-Reply-To: <3288253b-d9cf-ab24-a9d7-26187d0a5de0@HIDDEN>
 (Alexander Shukaev's message of "Thu, 19 Dec 2019 02:27:29 +0100")
Message-ID: <85sgke7ynf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 27646
Cc: 27646 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

tags 27646 - moreinfo unreproducible
forcemerge 21922 27646
quit

Alexander Shukaev <emacs@HIDDEN> writes:

> to the "*scratch*" buffer and indent to observe the following result
>
> (dolist (symbol '(ignore-errors
>                    xxx
>                    yyy)))
>
> The reason why this happens is because `ignore-errors' is a macro that has
>
> (declare (indent defun))
>
> Any other macro with the same declaration whose innocent symbol is
> used as the first element in a list would reproduce the above
> indentation bug.  Backquote is also affected.

That's Bug#21922, although the backquoted case is intentional (e.g., for
writing code in macros).





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27646; Package emacs. Full text available.

Message received at 27646 <at> debbugs.gnu.org:


Received: (at 27646) by debbugs.gnu.org; 19 Dec 2019 01:27:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 18 20:27:33 2019
Received: from localhost ([127.0.0.1]:44150 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ihkbE-0000gH-TP
	for submit <at> debbugs.gnu.org; Wed, 18 Dec 2019 20:27:33 -0500
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:54351)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <emacs@HIDDEN>) id 1ihkbD-0000g8-U3
 for 27646 <at> debbugs.gnu.org; Wed, 18 Dec 2019 20:27:32 -0500
X-Originating-IP: 178.4.8.44
Received: from [192.168.3.109]
 (dslb-178-004-008-044.178.004.pools.vodafone-ip.de [178.4.8.44])
 (Authenticated sender: forum@HIDDEN)
 by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id EA89FFF803;
 Thu, 19 Dec 2019 01:27:29 +0000 (UTC)
Subject: Re: bug#27646: Bug: Emacs Lisp Indentation
To: Noam Postavsky <npostavs@HIDDEN>
References: <c88b111b-58e5-4bce-9b63-ca5c3ee2ab6f@HIDDEN>
 <87o9srg4uj.fsf@HIDDEN> <87h8tdlt15.fsf@HIDDEN>
From: Alexander Shukaev <emacs@HIDDEN>
Message-ID: <3288253b-d9cf-ab24-a9d7-26187d0a5de0@HIDDEN>
Date: Thu, 19 Dec 2019 02:27:29 +0100
MIME-Version: 1.0
In-Reply-To: <87h8tdlt15.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 27646
Cc: 27646 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On 11/29/17 3:26 AM, Noam Postavsky wrote:
> close 27646
> quit
> 
> npostavs@HIDDEN writes:
> 
>> That would certainly be a bug, but I can't reproduce this, when I run
>> indent-region or indent-sexp on that code I get the correct indentation:
>>
>> (defconst init-font-lock-keywords
>>    `(,@(let ((constant-pattern "\\(?:\\sw\\|\\s_\\)+")
>>              (keywords         nil))
>>          (dolist (symbol '(init-a
>>                            init-b
> 
> Closing, since there's been no followup.
> 

This time I realized what's happening.  Put

(dolist (symbol '(ignore-errors
                   xxx
                   yyy)))

to the "*scratch*" buffer and indent to observe the following result

(dolist (symbol '(ignore-errors
                    xxx
                    yyy)))

The reason why this happens is because `ignore-errors' is a macro that has

(declare (indent defun))

Any other macro with the same declaration whose innocent symbol is used 
as the first element in a list would reproduce the above indentation 
bug.  Backquote is also affected.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27646; Package emacs. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.
bug unarchived. Request was from Alexander Shukaev <emacs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug archived. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.
bug closed, send any further explanations to 27646 <at> debbugs.gnu.org and Alexander Shukaev <emacs@HIDDEN> Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 27646 <at> debbugs.gnu.org:


Received: (at 27646) by debbugs.gnu.org; 29 Nov 2017 02:26:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 28 21:26:24 2017
Received: from localhost ([127.0.0.1]:35469 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eJs4u-000885-Iq
	for submit <at> debbugs.gnu.org; Tue, 28 Nov 2017 21:26:24 -0500
Received: from mail-it0-f51.google.com ([209.85.214.51]:45537)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>)
 id 1eJs4r-00087d-L8; Tue, 28 Nov 2017 21:26:21 -0500
Received: by mail-it0-f51.google.com with SMTP id z6so2231446iti.4;
 Tue, 28 Nov 2017 18:26:21 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=pq6I8QisKqKRsRuOVZ4a6peOA9zUHF/9bBZQOpdzrCY=;
 b=QQLhSDRQ0DEiPVrLBz3JOLmNEEZ7RWqPSq6wD3SO+I/GsKBKwhVkTN1gbGPFDCX5ba
 1Dvuht0WJoryXephz4rK47TbgYw6u/TshO7EAL6ntTvDtn8oMHTLWt8ZrpyMsUc2CO4o
 Ri+QLGTaTlAz+H8mzv4UpRtmolCh9IKKYIWKhLg8d/upLcAk/6kplWfSw4H77DKL3Lfk
 UiwZX82tOBtNN1aedrG1GOrDB2upL+NjXY3dWxupni+glDkvS3kE0eQt3FPkP8qUZcgn
 6wnswrGlCWE4ZbGrz8i8mluA55vkQke0x7BQlDESaxV9Uv2evRBYV7XeXhULZbMi7bK6
 iiLQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=pq6I8QisKqKRsRuOVZ4a6peOA9zUHF/9bBZQOpdzrCY=;
 b=Z2r2yVsQD7OEZmFn/phwMrRP8u4WJI53E3RzhXpxLT1mmGR7lM+E1JK0ZEcyTjqYLC
 5Ic9E8gDlOllfZYk6cLi42rVgjhAOtjzpBkvvdmYgxXKzaU/OA7DevvOmJwtIKfroE2B
 3bpGvmG4nojuGpX9qPr+GrUVilwO66tEw7h/LFSQoFQd78GHue37wr/LlykDg42KDvnD
 Wz4qnjnY7EzyC8hSyFPQ7W/71fvCzW+XTmFIYI0FNtxo9D7L5hD12fe0SfzgItr1lzvL
 PXHdXrakSiofhiVoJhc0N4s5BcdieZ6izouxANwe1cxIXzcR8VLxjKVIIk7pD5miRLb+
 zd3w==
X-Gm-Message-State: AJaThX5xunHvoxgOEWVJtj62lKfIuNnD84MBttAYjUHtVT+4jXKBb+sU
 jYKsG2VDSDiaE5P0MP15WhwFbgAB
X-Google-Smtp-Source: AGs4zMYM/eFDWfplN/4GXV88f9WTqNELUV73/aABv27I98gEPhyMNjwVhg8KtoWFAJCryEZBeGbMSA==
X-Received: by 10.36.105.65 with SMTP id e62mr5797241itc.6.1511922375946;
 Tue, 28 Nov 2017 18:26:15 -0800 (PST)
Received: from zebian ([45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id 139sm8219056itm.2.2017.11.28.18.26.14
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Tue, 28 Nov 2017 18:26:15 -0800 (PST)
From: Noam Postavsky <npostavs@HIDDEN>
To: Alexander Shukaev <emacs@HIDDEN>
Subject: Re: bug#27646: Bug: Emacs Lisp Indentation
References: <c88b111b-58e5-4bce-9b63-ca5c3ee2ab6f@HIDDEN>
 <87o9srg4uj.fsf@HIDDEN>
Date: Tue, 28 Nov 2017 21:26:14 -0500
In-Reply-To: <87o9srg4uj.fsf@HIDDEN> (npostavs's message of
 "Mon, 10 Jul 2017 21:05:56 -0400")
Message-ID: <87h8tdlt15.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 27646
Cc: 27646 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

close 27646
quit

npostavs@HIDDEN writes:

> That would certainly be a bug, but I can't reproduce this, when I run
> indent-region or indent-sexp on that code I get the correct indentation:
>
> (defconst init-font-lock-keywords
>   `(,@(let ((constant-pattern "\\(?:\\sw\\|\\s_\\)+")
>             (keywords         nil))
>         (dolist (symbol '(init-a
>                           init-b

Closing, since there's been no followup.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27646; Package emacs. Full text available.
Added tag(s) unreproducible. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at 27646 <at> debbugs.gnu.org:


Received: (at 27646) by debbugs.gnu.org; 11 Jul 2017 01:04:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 10 21:04:34 2017
Received: from localhost ([127.0.0.1]:33151 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dUjbO-0003Ri-1c
	for submit <at> debbugs.gnu.org; Mon, 10 Jul 2017 21:04:34 -0400
Received: from mail-it0-f50.google.com ([209.85.214.50]:35390)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>)
 id 1dUjbM-0003RP-18; Mon, 10 Jul 2017 21:04:32 -0400
Received: by mail-it0-f50.google.com with SMTP id v202so49748156itb.0;
 Mon, 10 Jul 2017 18:04:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=dL2NGveWHDn7NHyAGplFAd6VFHcOW6wgQFW157GIC3M=;
 b=oVF2EpS97p4J5D+nDiPOdjw8uJ3GD8oPRgynU6wrAB5X4PaRs4mRPoQeC3Dw4bbE/S
 4B2rRi3u7gsWh4aToWJfaJ2HE5OW8QqClVuWcqOkqNIxuNUhVvp9gNdxYdRzuTaBTu4F
 4oyfzHYoNpwSiw1YdItus+0EQt8PFiZA1/39gR50pUOmJn1v6rgtJqb5FllrMssgu8CL
 yMExau4wnD6I3uvvTweS92gM+9fit8dJk/NFPwz2HsA+yINI+2ckrBZ6p0Q0gWsfdunG
 weWwIhK+Tejh5N2IZzfs61NV6eqTLR59RaVVUAQ0/UH5mJcSiqboXMeKgLB5fk7c52aC
 mWJw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version
 :content-transfer-encoding;
 bh=dL2NGveWHDn7NHyAGplFAd6VFHcOW6wgQFW157GIC3M=;
 b=CjA3dQr9v90Xe/d+FV0UKWuvNiGf/9HFJvHiWVrS1M2HUyhm31Xd7z9Sr82tMo0EAA
 Y44U4xgUcBZKln4g4leqAxDPjftnDz+8gwoOrofklLJ1I/WTNIKkkFfXqnB6tpl7VtMY
 5QXSwihYZLMjJA8PsN4BkH8FuUEinQw8h1/LmtLArYKguy21wTw/A93EFahVdRIRnN55
 WyVtMCAhVvVXO55RNM5EcDIbjzOxIXcK9TvHZZpVktPyJWCkdDlVH1G6s2hQoDQjO8WZ
 EJ3ekJvwlFbqnCPmpuXDyGTDb5z8k6/5rZI4tGIS4UdLVt+BqDpn+cjhFKPxsFNOPuMo
 pU6A==
X-Gm-Message-State: AIVw113c4HuhqoXnKNUG1zLn9qY5fqZlYNcTzziRDebqcBIJZSjh2EVb
 ZQb9RHDo3l7nOVZg
X-Received: by 10.107.180.5 with SMTP id d5mr7116095iof.56.1499735066087;
 Mon, 10 Jul 2017 18:04:26 -0700 (PDT)
Received: from zony ([45.2.7.65])
 by smtp.googlemail.com with ESMTPSA id o17sm6774861ioe.1.2017.07.10.18.04.23
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 10 Jul 2017 18:04:24 -0700 (PDT)
From: npostavs@HIDDEN
To: Alexander Shukaev <emacs@HIDDEN>
Subject: Re: bug#27646: Bug: Emacs Lisp Indentation
References: <c88b111b-58e5-4bce-9b63-ca5c3ee2ab6f@HIDDEN>
Date: Mon, 10 Jul 2017 21:05:56 -0400
In-Reply-To: <c88b111b-58e5-4bce-9b63-ca5c3ee2ab6f@HIDDEN>
 (Alexander Shukaev's message of "Mon, 10 Jul 2017 22:05:43 +0200")
Message-ID: <87o9srg4uj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 27646
Cc: 27646 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

tags 27646 + unreproducible
quit

Alexander Shukaev <emacs@HIDDEN> writes:

> Hi,
>
> With latest Emacs, I see the following indentation quirk with the
> Emacs Lisp list:
>
> (defconst init-font-lock-keywords
>   `(,@(let ((constant-pattern "\\(?:\\sw\\|\\s_\\)+")
>             (keywords         nil))
>         (dolist (symbol '(init-a
>                            init-b

That would certainly be a bug, but I can't reproduce this, when I run
indent-region or indent-sexp on that code I get the correct indentation:

(defconst init-font-lock-keywords
  `(,@(let ((constant-pattern "\\(?:\\sw\\|\\s_\\)+")
            (keywords         nil))
        (dolist (symbol '(init-a
                          init-b

In GNU Emacs 26.0.50 (build 60, x86_64-unknown-linux-gnu, X toolkit, Xaw sc=
roll bars)
 of 2017-07-10 built on zony
Repository revision: 689c5c20d1174e95be50e674d05632545eb4b9c5
Windowing system distributor 'The X.Org Foundation', version 11.0.11901000
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
You can run the command =E2=80=98emacs-lisp-mode=E2=80=99 with M-x e-li-mo =
RET
Mark set
Indenting region...done
Mark activated

Configured using:
 'configure --cache-file=3D../debug-config.cache 'CFLAGS=3D-O0 -g3
 -march=3Dnative' --enable-checking=3Dyes,glyphs
 --enable-check-lisp-object-type MAKEINFO=3Dmakeinfo-4.13a
 --with-x-toolkit=3Dlucid --with-toolkit-scroll-bars --with-gif=3Dno
 --with-jpeg=3Dno 'CFLAGS=3D-O2 -g3 -march=3Dnative'
 --cache-file=3D../opt-config.cache'

Configured features:
XPM TIFF PNG RSVG SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2
FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 LIBSYSTEMD






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#27646; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Jul 2017 20:06:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 10 16:06:42 2017
Received: from localhost ([127.0.0.1]:33033 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1dUex8-0002w5-5Y
	for submit <at> debbugs.gnu.org; Mon, 10 Jul 2017 16:06:42 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34764)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <emacs@HIDDEN>) id 1dUex6-0002vt-4b
 for submit <at> debbugs.gnu.org; Mon, 10 Jul 2017 16:06:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <emacs@HIDDEN>) id 1dUewz-0004Ju-V7
 for submit <at> debbugs.gnu.org; Mon, 10 Jul 2017 16:06:34 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:47139)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <emacs@HIDDEN>)
 id 1dUewz-0004Jd-Rk
 for submit <at> debbugs.gnu.org; Mon, 10 Jul 2017 16:06:33 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:53963)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <emacs@HIDDEN>) id 1dUewy-00069v-Sp
 for bug-gnu-emacs@HIDDEN; Mon, 10 Jul 2017 16:06:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <emacs@HIDDEN>) id 1dUewv-0004Hs-O9
 for bug-gnu-emacs@HIDDEN; Mon, 10 Jul 2017 16:06:32 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:33851)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <emacs@HIDDEN>)
 id 1dUewv-000480-HO
 for bug-gnu-emacs@HIDDEN; Mon, 10 Jul 2017 16:06:29 -0400
Received: from mfilter27-d.gandi.net (mfilter27-d.gandi.net [217.70.178.155])
 by relay2-d.mail.gandi.net (Postfix) with ESMTP id 527D4C5A61;
 Mon, 10 Jul 2017 22:05:46 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mfilter27-d.gandi.net
Received: from relay2-d.mail.gandi.net ([IPv6:::ffff:217.70.183.194])
 by mfilter27-d.gandi.net (mfilter27-d.gandi.net [::ffff:10.0.15.180])
 (amavisd-new, port 10024)
 with ESMTP id PCYteM9T76HP; Mon, 10 Jul 2017 22:05:44 +0200 (CEST)
X-Originating-IP: 88.69.124.144
Received: from [192.168.3.117]
 (dslb-088-069-124-144.088.069.pools.vodafone-ip.de [88.69.124.144])
 (Authenticated sender: forum@HIDDEN)
 by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 81D4EC5A67;
 Mon, 10 Jul 2017 22:05:44 +0200 (CEST)
To: bug-gnu-emacs@HIDDEN
From: Alexander Shukaev <emacs@HIDDEN>
Subject: Bug: Emacs Lisp Indentation
Message-ID: <c88b111b-58e5-4bce-9b63-ca5c3ee2ab6f@HIDDEN>
Date: Mon, 10 Jul 2017 22:05:43 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: npostavs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Hi,

With latest Emacs, I see the following indentation quirk with the Emacs 
Lisp list:

(defconst init-font-lock-keywords
   `(,@(let ((constant-pattern "\\(?:\\sw\\|\\s_\\)+")
             (keywords         nil))
         (dolist (symbol '(init-a
                            init-b
                            init-c
                            init-d
                            init-e
                            init-f))
           (push `(,(format "(%s\\_>" symbol)
                   (,constant-pattern
                    (save-excursion
                      (search-forward-regexp ,constant-pattern))
                    nil
                    (0 font-lock-constant-face nil t)))
                 keywords))
         keywords)))

instead of the expected:

(defconst init-font-lock-keywords
   `(,@(let ((constant-pattern "\\(?:\\sw\\|\\s_\\)+")
             (keywords         nil))
         (dolist (symbol '(init-a
                           init-b
                           init-c
                           init-d
                           init-e
                           init-f))
           (push `(,(format "(%s\\_>" symbol)
                   (,constant-pattern
                    (save-excursion
                      (search-forward-regexp ,constant-pattern))
                    nil
                    (0 font-lock-constant-face nil t)))
                 keywords))
         keywords)))

Please, have a look as time permits.  Thank you in advance!

Kind regards,
Alexander




Acknowledgement sent to Alexander Shukaev <emacs@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#27646; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 17 Jan 2020 18:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.