all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alexander Shukaev <emacs@Alexander.Shukaev.name>
To: Noam Postavsky <npostavs@gmail.com>
Cc: 27646@debbugs.gnu.org, 21922@debbugs.gnu.org
Subject: bug#21922: bug#27646: Bug: Emacs Lisp Indentation
Date: Fri, 17 Jan 2020 21:26:49 +0100	[thread overview]
Message-ID: <5d579307-d8a0-168e-297f-02b59411c01d@Alexander.Shukaev.name> (raw)
In-Reply-To: <85sgke7ynf.fsf@gmail.com>

On 17/01/2020 18:58, Noam Postavsky wrote:
> tags 27646 - moreinfo unreproducible
> forcemerge 21922 27646
> quit
> 
> Alexander Shukaev <emacs@Alexander.Shukaev.name> 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).
> 

I use the following trick right now:

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

Since it's impossible to resolve that issue reliably and for all cases 
including backquote, I propose to introduce some special comment (aka 
;###list) format to indicate that this is a list rather than code to be 
evaluated.  In different contexts the same code could be desired to be 
treated differently namely either as data or as to be evaluated.





  reply	other threads:[~2020-01-17 20:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10 20:05 bug#27646: Bug: Emacs Lisp Indentation Alexander Shukaev
2017-07-11  1:05 ` npostavs
2017-11-29  2:26   ` Noam Postavsky
2019-12-19  1:27     ` Alexander Shukaev
2020-01-17 17:58       ` Noam Postavsky
2020-01-17 20:26         ` Alexander Shukaev [this message]
2022-01-30 22:46           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d579307-d8a0-168e-297f-02b59411c01d@Alexander.Shukaev.name \
    --to=emacs@alexander.shukaev.name \
    --cc=21922@debbugs.gnu.org \
    --cc=27646@debbugs.gnu.org \
    --cc=npostavs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.