From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Leo Liu <sdl.web@gmail.com>
Cc: 17955@debbugs.gnu.org
Subject: bug#17955: 24.3.92; octave.el: indentation following ... or \
Date: Sun, 06 Jul 2014 21:49:41 -0400 [thread overview]
Message-ID: <jwvy4w6vu13.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <m3fvie96c9.fsf@gmail.com> (Leo Liu's message of "Sun, 06 Jul 2014 17:36:38 +0800")
> As reported on 2013-07-03 in
> http://article.gmane.org/gmane.comp.gnu.octave.maintainers/33796
> In octave mode:
> a = \
> b
> b is aligned to a. Previously there was an offset per
> octave-continuation-offset.
> The octave smie lexer may or may not return the continuation token (...
> or \), any idea why it is made to behave like this?
> octave-continuation-offset is also unused. Comments?
Same as for sh-script's SMIE support, the new indentation code performs
indentation of continued lines as if the "backslash newline" was
a normal newline except it doesn't contain an implicit semi-colon.
So you should get indentation like:
a = b + a * \
c
So you should be able to control indentation of "b" above by tweaking
the (:after . "=") or (:before . "=") rule.
That indentation style is incompatible with octave-continuation-offset
(which basically assumes that continued lines are just a single line
wrapped). But, just like we did in sh-script.el, we could/should
probably add an indentation rule to SMIE to make sure that continued
lines are indented at least as much as octave-continuation-offset.
Stefan
next prev parent reply other threads:[~2014-07-07 1:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-06 9:36 bug#17955: 24.3.92; octave.el: indentation following ... or \ Leo Liu
2014-07-07 1:49 ` Stefan Monnier [this message]
2021-05-29 5:06 ` Lars Ingebrigtsen
2021-05-29 14:44 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-30 4:26 ` Lars Ingebrigtsen
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=jwvy4w6vu13.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=17955@debbugs.gnu.org \
--cc=sdl.web@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 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).