From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.help Subject: Re: electric-layout-local-mode does not work in c-mode and java-mode Date: Tue, 04 Feb 2020 09:10:15 +0100 Message-ID: References: <87pnevi11m.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="46359"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Help To: stardiviner Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 04 09:11:08 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iytIa-000ByD-K2 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 Feb 2020 09:11:08 +0100 Original-Received: from localhost ([::1]:54306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iytIZ-00025j-LO for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 Feb 2020 03:11:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48064) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iytHn-000229-OD for help-gnu-emacs@gnu.org; Tue, 04 Feb 2020 03:10:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iytHm-0004Cx-NS for help-gnu-emacs@gnu.org; Tue, 04 Feb 2020 03:10:19 -0500 Original-Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:35330) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iytHm-00049w-GT for help-gnu-emacs@gnu.org; Tue, 04 Feb 2020 03:10:18 -0500 Original-Received: by mail-wm1-x32e.google.com with SMTP id b17so2345317wmb.0 for ; Tue, 04 Feb 2020 00:10:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=jZx8WEdAlQJ+JRVHl5ebmE+Q+lOLVj0aKL8pkA3ejBs=; b=CxFNnSIl+uUEwwdWknIx6U+SQOuoG/PQyOepKH9oDbINv+JZ8uvTQ6oK3btnJiW3bC pqQnFMUlsDnUZYOyLbfM05QLK738+3C4ynoFlokhZmDhtszffKJlf+oPwSnVKtMPwtl5 EsQbYlsS02Bk4xONqFxmUeLdcvIT8MBWRi8hjunPv2VQvRGrrq4tdBI/2Ic3+keaHH3/ BdnVr4m4e5RozKyb0J9yhodeGYKOGkQa6tQt6qdozM8wutFWpcGSkV24GMhMUKw9tafD 7AiGmqChAQZckhHh8Mf+/N8YiLr4PJgkUZzPaZ2zNr6Qd4KexIHvUwk0nBqD3wXz2seF cp/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=jZx8WEdAlQJ+JRVHl5ebmE+Q+lOLVj0aKL8pkA3ejBs=; b=KDCbKFro82oIO/Cym+lNmUnJH1ylpyIGl5qfNRF0FY4bkimaACUhw6N9s63NNfz7G6 oIMNwJnvclunssGKFjl9+lxJxRNootwEtjzkUXM5HFOfrYD2u9plGtvUnVGQsFOSm27b XClATNX2C0lUchd796IWxLCw4YNK7cJvtloKJjb1mv6UqxHdq35s9cJoDzLbM3ahkqIk Xgd+bttUnq8RTKlzAqakGvPgIpnPKD2dwLhx+Y0FFit9DzcCROwR4bo7L9wXhJuGnE4t iSPZMdRcL+akemeAxpzd5rhZ2/qM4SElG3h/EAy7Du5aJJ9Ke2hnt0Ilp+4mIE4tJoMT nKGA== X-Gm-Message-State: APjAAAWpEXSt9e48MDeRxHUmK10BUO+uWVB7SMmroUkDvgWF1MTHyVhr T7O9e0odIWM41C7YZ76M4esQ4plSqiU= X-Google-Smtp-Source: APXvYqzQTsNfNKWQ5YWEA5t87Kc+gC5Q88CO9Z2jlu34YdGc9sMDkUZpDJhtx1pezL/jP9v/PRQEXw== X-Received: by 2002:a05:600c:291d:: with SMTP id i29mr4454601wmd.39.1580803816245; Tue, 04 Feb 2020 00:10:16 -0800 (PST) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id e6sm2663368wme.3.2020.02.04.00.10.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 00:10:15 -0800 (PST) Gmane-Reply-To-List: yes In-Reply-To: <87pnevi11m.fsf@gmail.com> (stardiviner's message of "Tue, 04 Feb 2020 09:39:01 +0800") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122336 Archived-At: >>>>> On Tue, 04 Feb 2020 09:39:01 +0800, stardiviner = 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=CA=BCt 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