all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: 43329@debbugs.gnu.org
Subject: bug#43329: 28.0.50; Incorrect indentation for variables starting with `def' in let form
Date: Fri, 11 Sep 2020 12:26:27 +0200	[thread overview]
Message-ID: <87y2lg1uek.fsf@gnus.org> (raw)
In-Reply-To: <wvr4imckd3o9.fsf@gmail.com> (Philipp Stephani's message of "Fri,  11 Sep 2020 12:10:46 +0200")

Philipp Stephani <p.stephani2@gmail.com> writes:

> In the scratch buffer, enter
>
> (let ((defa
>        foo)))
>
> and reindent the second line.  Emacs will insert an additional space
> before `foo' so that the `f' is now below the `e'.  This seems to happen
> only for variables starting with `def' (but not `def' itself).

Yes, the Emacs Lisp indentation machinery assumes that everything that
starts with "def" is a macro that defines something.  That's pretty
quirky, but it's been that way since forever, so it's probably too late
to do something about that now.

It should, however, be possible to do something about this in a `let'
form, you'd think.  But I've tried to find the place where this happens
(I was looking at it just the other day!), but my grep skills fail me.

Anybody remember which function this happens in?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2020-09-11 10:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 10:10 bug#43329: 28.0.50; Incorrect indentation for variables starting with `def' in let form Philipp Stephani
2020-09-11 10:26 ` Lars Ingebrigtsen [this message]
2020-09-11 16:35   ` Noam Postavsky
2020-09-12 11:57     ` Lars Ingebrigtsen
2020-09-12 15:48       ` Stefan Monnier
2020-09-13 12:44         ` Lars Ingebrigtsen
2020-09-13 15:24           ` Stefan Monnier
2020-09-13 17:20             ` Lars Ingebrigtsen
2021-10-13 19:23               ` Lars Ingebrigtsen
2021-10-18  8:00                 ` bug#43329: bug#33301: 27.0.50; broken elisp indentation for non-definition symbols starting with "def.." 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=87y2lg1uek.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=43329@debbugs.gnu.org \
    --cc=p.stephani2@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.