From: Robert Pluim <rpluim@gmail.com>
To: stardiviner <numbchild@gmail.com>
Cc: Emacs Help <help-gnu-emacs@gnu.org>
Subject: Re: electric-layout-local-mode does not work in c-mode and java-mode
Date: Tue, 04 Feb 2020 09:10:15 +0100 [thread overview]
Message-ID: <m28slilqmw.fsf@gmail.com> (raw)
In-Reply-To: <87pnevi11m.fsf@gmail.com> (stardiviner's message of "Tue, 04 Feb 2020 09:39:01 +0800")
>>>>> On Tue, 04 Feb 2020 09:39:01 +0800, stardiviner <numbchild@gmail.com> said:
stardiviner> When I press ";", electric-layout-local-mode does not auto insert newline and jump to newline.
stardiviner> I use similar configuration works fine on js-mode and web-mode.
stardiviner> I also tested with minimal emacs configuration. Still does not work.
stardiviner> Does anyone knows what's wrong and how to fix it?
I donʼt use electric-layout-local-mode, I use this instead:
c-toggle-auto-newline is an interactive compiled Lisp function in
`cc-cmds.el'.
(c-toggle-auto-newline &optional ARG)
Probably introduced at or before Emacs version 22.1.
Toggle auto-newline feature.
Optional numeric ARG, if supplied, turns on auto-newline when
positive, turns it off when negative, and just toggles it when zero or
left out.
Turning on auto-newline automatically enables electric indentation.
When the auto-newline feature is enabled (indicated by "/la" on the
mode line after the mode name) newlines are automatically inserted
after special characters such as brace, comma, semi-colon, and colon.
Robert
next prev parent reply other threads:[~2020-02-04 8:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-04 1:39 electric-layout-local-mode does not work in c-mode and java-mode stardiviner
2020-02-04 8:10 ` Robert Pluim [this message]
2020-02-05 5:05 ` stardiviner
2020-02-04 13:43 ` Stefan Monnier
2020-02-05 7:38 ` [SOLVED] " stardiviner
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=m28slilqmw.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=numbchild@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.
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).