GNU bug report logs - #16202
24.3.50; lisp-mode's indent-sexp might be buggy (for slime in particular, and lisp in general)

Previous Next

Package: emacs;

Reported by: joaotavora <at> gmail.com (João Távora)

Date: Fri, 20 Dec 2013 15:09:02 UTC

Severity: normal

Tags: notabug

Found in version 24.3.50

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: npostavs <at> users.sourceforge.net
To: joaotavora <at> gmail.com (João Távora)
Cc: 16202 <at> debbugs.gnu.org
Subject: bug#16202: 24.3.50; lisp-mode's indent-sexp might be buggy (for slime in particular, and lisp in general)
Date: Wed, 13 Jul 2016 21:47:05 -0400
joaotavora <at> gmail.com (João Távora) writes:

> ...as does indenting the sexp with indent-region. This might be naive,
> but why not super-simplify indent-sexp to be something like this?
>
>    (defun indent-sexp (&optional endpos)
>      (interactive)
>      (if endpos
>          (indent-region (point) endpos)
>        (indent-region (point) (save-excursion
>                                 (forward-sexp 1)
>                                 (point)))))

Just for the record, at least one significant difference is that
indent-sexp also indents comments at the end of the line, while
indent-region does not.

e.g.

(progn
       ;; comment on its own line
  (do-something) ; a comment which is not moved by indent-region
  (do-another-thing))




This bug report was last modified 7 years and 160 days ago.

Previous Next


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