help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: electric-layout-local-mode does not work in c-mode and java-mode


From: Robert Pluim
Subject: Re: electric-layout-local-mode does not work in c-mode and java-mode
Date: Tue, 04 Feb 2020 09:10:15 +0100

>>>>> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]