unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Spenser Truex <lists@spensertruex.com>
To: 40059@debbugs.gnu.org
Subject: bug#40059: lisp-mode indentation not aligned vertically
Date: Fri, 13 Mar 2020 21:46:48 -0700	[thread overview]
Message-ID: <8736ab4k7b.fsf@spensertruex.com> (raw)


This code sample demonstrates what I consider to be a bug in the
lisp-mode indentation.

Here is a very simple example:

(:a :b
 :c
    :d
 :e)


Here it is in an actual use case (defining Common Lisp packages)
(defpackage :example
  (:use :cl)

  ;; Here is the weird part:
  (:export :thing1
   :thing2
           :thing3
    :thing4
           :thing5))

A sane, non-buggy indentation would be this:
(defpackage :example
  (:use :cl)

  ;; These are aligned vertically:
  (:export :thing1
           :thing2
           :thing3
           :thing4
           :thing5))

This seems to be primarily caused by the keyword argument as the first
element of the unquoted list.

This is especially an issue if using aggressive formatting like
aggressive indent mode. <https://github.com/Malabarba/aggressive-indent-mode/issues/122>

-- 
Spenser Truex
spensertruex.com
SFSU Computer Science





             reply	other threads:[~2020-03-14  4:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-14  4:46 Spenser Truex [this message]
2020-03-14 11:47 ` bug#40059: lisp-mode indentation not aligned vertically Noam Postavsky
2020-03-15 16:00   ` Spenser Truex
2020-03-15 17:36     ` Noam Postavsky
2020-03-15 23:38       ` Spenser Truex
2020-03-16  9:24         ` martin rudalics
2020-05-03  1:13           ` Stefan Kangas

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=8736ab4k7b.fsf@spensertruex.com \
    --to=lists@spensertruex.com \
    --cc=40059@debbugs.gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).