From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: newline-and-indent vs. electric-indent-mode Date: Sat, 23 Jan 2021 01:00:12 +0200 Message-ID: References: <87wnw5yt58.fsf@hajtower> <01d07f6d-cc4c-2f54-4bae-a611bba7be93@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39551"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: =?UTF-8?Q?Harald_J=c3=b6rg?= , Emacs Developer List To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 23 00:01:46 2021 Return-path: Envelope-to: ged-emacs-devel@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 1l35R4-000ACa-BT for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Jan 2021 00:01:46 +0100 Original-Received: from localhost ([::1]:38272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l35R3-0001nn-Bh for ged-emacs-devel@m.gmane-mx.org; Fri, 22 Jan 2021 18:01:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l35Pg-0001Ft-9o for emacs-devel@gnu.org; Fri, 22 Jan 2021 18:00:20 -0500 Original-Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:36803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l35Pe-000567-4L for emacs-devel@gnu.org; Fri, 22 Jan 2021 18:00:20 -0500 Original-Received: by mail-ed1-x52b.google.com with SMTP id d2so4814149edz.3 for ; Fri, 22 Jan 2021 15:00:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BT9Pg/OrOEPI08T/94sjZaFkBYhkNHWXFKr6eZPZyM8=; b=EmLT38sY0K+6wwmPaj6Bp+SIfvYNozVMHkZLKCGtWlNgrL8CQvcFY182mwFBDRMzib MAWVD/yQc1jBOOd1eIRWMMm76vBX/mORyskJuIvnuuxadJ81NuQB5HEZfgtQgeNIGTbo qpqBSDijkDTMhqldH8EDo/JX64gsFDbz2PY5CLmHdzTKB5NV3lQdL3KVz/37AKUkPes3 krhGKKOslWbJc1jb+jEUS7/7WNNJ+Xpz4Jy1CY76Er56EXIqEX4hT30MtCyXUmmKm6hc 5UtmWTxLtKPcoFum3AD1W7BvdpfRYw5YcZpI25t6FIgqZMBO55fFTEMgBAvSayp81zap i6cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BT9Pg/OrOEPI08T/94sjZaFkBYhkNHWXFKr6eZPZyM8=; b=A51AW1v+gJe6bRF9a4JFLhQjXX8bQYPb9JkPNlV01fcYoTkvfErgSUQRQGut0Wwgz4 s9gUJoohS7aAHHHmknEcPNLYccweH0+USZrd2LJ5EMxC+R9OzzMvPd8+97CduF/Rmm4j TIVZNnH2OTYiqc7QC2h0cOcOfz8l1XyFGvgXIy1eJZ0VqXiagOJkhEkKPt7oHqBxJJrS mwIPhHVGv5Lr7PiFoQJD//MOCqvOspCEdQEfi9XwOilY+nzawSM0vhKHJjHWZej7gpQE ziiSk1YejPLmdRIG+iOd4KzXl34S33WH83hv5gwu7pHM3Oj5+JamWkY4xCNendqzxtJs F40g== X-Gm-Message-State: AOAM530wdNOrWyAtLrNwqrCe9Xa6N0lmcfslju14iSAPhv2Il92i5hjj tTNQPVid/FE2CS1z6KBU5hw3WUZFw/k= X-Google-Smtp-Source: ABdhPJyndfk3XbIrx4pcvyjo+J+BakjicInvfWubm1e59kauue43mfp4wZo1iWwgaNh8OY6C1nbbiQ== X-Received: by 2002:a05:6402:60a:: with SMTP id n10mr443218edv.230.1611356414812; Fri, 22 Jan 2021 15:00:14 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id 38sm6491644edq.62.2021.01.22.15.00.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Jan 2021 15:00:14 -0800 (PST) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=raaahh@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.221, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263289 Archived-At: On 23.01.2021 00:56, Stefan Monnier wrote: >> That would disable the effects of electric-indent-functions, and in >> particular, of ruby--electric-indent-p. > I don't see why. AFAIK it should only inhibit the "reindent original > line when inserting \n". It should affect indentation of the line after > the inserted \n nor should it affect indentation when inserting > other chars. It also affect "reindent original line when inserting something other than \n", which is what ruby--electric-indent-p is all about (e.g. I type 'd' finishing the token 'end', and the line is reindented). It's just that in my mental model \n doesn't belong to the current line, only to the next one. So it shouldn't reindent the original line. Perhaps others feel differently.