bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27646: Bug: Emacs Lisp Indentation


From: Alexander Shukaev
Subject: bug#27646: Bug: Emacs Lisp Indentation
Date: Thu, 19 Dec 2019 02:27:29 +0100

On 11/29/17 3:26 AM, Noam Postavsky wrote:
close 27646
quit

npostavs@users.sourceforge.net 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]