From: Leo Liu <sdl.web@gmail.com>
To: Noam Postavsky <npostavs@gmail.com>
Cc: 35286@debbugs.gnu.org
Subject: bug#35286: 26.2; indent-sexp broken
Date: Tue, 16 Apr 2019 11:19:00 +0800 [thread overview]
Message-ID: <m1tveyy6vv.fsf@gmail.com> (raw)
In-Reply-To: <87ftqizs5d.fsf@gmail.com> (Noam Postavsky's message of "Mon, 15 Apr 2019 20:54:22 -0400")
On 2019-04-15 20:54 -0400, Noam Postavsky wrote:
> The minimal example would be (with point before "foo", the "xx)"
> part gets indented too):
>
> foo (bar
> xx)
>
> I'm not sure if anyone relies on that (I broke it in 26.1 and nobody
> reported it). The main motivating example is
>
> #s(foo
> bar)
>
> which is due to forward-sexp not handling #s correctly for Emacs Lisp
> (it's treated as a separate sexp rather than as a whole record
> expression).
Thanks for the examples.
>> Not just comments though it can be anything. For example, put the
>> following in prolog-mode. Move point to the first `{' char and then M-x
>> indent-sexp.
>
> Hmm, I'm a bit confused here. I thought indent-sexp is only good for
> Lisp-based languages. Do lisp-indent-calc-next/calculate-lisp-indent
> give usable results for prolog or ruby??
Treating things between parentheses as sexp and using indent-sexp to
indent it is not lisp-specific (imagine if we couldn't use forward-sexp
on parentheses in non-lisp languages). I think I have been doing it for
over a decade now. Sometimes indirectly. For example, I use paredit to
input parentheses everywhere and paredit uses indent-sexp to indent the
inserted pair. It's been working nicely forever until the change in 26.2
breaks it.
next prev parent reply other threads:[~2019-04-16 3:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 12:14 bug#35286: 26.2; indent-sexp broken Leo Liu
2019-04-15 23:57 ` Noam Postavsky
2019-04-16 0:35 ` Leo Liu
2019-04-16 0:54 ` Noam Postavsky
2019-04-16 3:19 ` Leo Liu [this message]
2019-04-16 12:16 ` Noam Postavsky
2019-04-16 12:57 ` Leo Liu
2019-04-16 13:13 ` Leo Liu
2019-04-21 8:41 ` Leo Liu
2019-04-22 16:51 ` 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=m1tveyy6vv.fsf@gmail.com \
--to=sdl.web@gmail.com \
--cc=35286@debbugs.gnu.org \
--cc=npostavs@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.