From: npostavs@users.sourceforge.net
To: joaotavora@gmail.com (João Távora)
Cc: 16202@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 [thread overview]
Message-ID: <871t2xf0ti.fsf@users.sourceforge.net> (raw)
In-Reply-To: <jjb8uvf5zma.fsf@gmail.com> ("João Távora"'s message of "Fri, 20 Dec 2013 15:08:29 +0000")
joaotavora@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))
next prev parent reply other threads:[~2016-07-14 1:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 15:08 bug#16202: 24.3.50; lisp-mode's indent-sexp might be buggy (for slime in particular, and lisp in general) João Távora
2016-07-14 1:47 ` npostavs [this message]
2017-03-04 21:39 ` npostavs
2017-12-17 2:18 ` Noam Postavsky
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=871t2xf0ti.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=16202@debbugs.gnu.org \
--cc=joaotavora@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.