GNU bug report logs - #40059
lisp-mode indentation not aligned vertically

Previous Next

Package: emacs;

Reported by: Spenser Truex <lists <at> spensertruex.com>

Date: Sat, 14 Mar 2020 04:57:01 UTC

Severity: normal

Tags: moreinfo, unreproducible

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Spenser Truex <lists <at> spensertruex.com> 
To: bug-gnu-emacs <at> gnu.org
Subject: lisp-mode indentation not aligned vertically
Date: Fri, 13 Mar 2020 21:46:48 -0700
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




This bug report was last modified 5 years and 75 days ago.

Previous Next


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