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 00:43:15 +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="2546"; 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 Fri Jan 22 23:44:11 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 1l35A3-0000ZO-4d for ged-emacs-devel@m.gmane-mx.org; Fri, 22 Jan 2021 23:44:11 +0100 Original-Received: from localhost ([::1]:48678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l35A2-0001u6-6X for ged-emacs-devel@m.gmane-mx.org; Fri, 22 Jan 2021 17:44:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l359F-0001B1-Te for emacs-devel@gnu.org; Fri, 22 Jan 2021 17:43:22 -0500 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:40357) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l359E-0007q1-7T for emacs-devel@gnu.org; Fri, 22 Jan 2021 17:43:21 -0500 Original-Received: by mail-wr1-x42e.google.com with SMTP id c12so6533529wrc.7 for ; Fri, 22 Jan 2021 14:43:19 -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=uDpk7S2q7eVth1qvWWB2mXH4QiisrYkA+71Euq5KmME=; b=e/7WrNKZVpJ2QvRcZVGlIiLj+NyLT23e7LOzsXUu4uxOJTaOAeY5aXkDYeWJbeuUSj 64pgWut/+yWzGoMI3QTWn0YU9LcgIb4/MruCFiiRVQq0jf+5LhwiJJ981X7dwa3vmW1Z LPvl6f7mfsfUvjRwahZsrvHwn+uP3UbuokOxQpS/47+viEwnPFNJbG8onERb/yyaN09j pyH4RBxQuqRnyuGaZfzy5Z16kyJZnVhC+wY9BF+9zqwu24WJnk1IxQ/Sey5uye4rDcuM eOXuHduic8W7841z+sqKSRwr/8qq2iKWToAqHa4Md2bqCZQoTO70oZCuNDQFKnb6y+SN YcVw== 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=uDpk7S2q7eVth1qvWWB2mXH4QiisrYkA+71Euq5KmME=; b=VGW+/4d2J9WUQCzL1UBNUlGoZJk35fQoyef2h3niUHAlVvlU0qVjbkEuBg/XjqzsNi pdQCXCg8fZsG5wjFiv8muQMQEoUQih9FgtclhQcO6zEgAhoEyCgE5tXvi8EMIlBWzQAj Kow4aQyDxLfgaErbcyoceuO6ZPrB7yhiOzEH8psd1cdkpN8TuSgBJ+x/qF7DdulHE+sY 4UzpOPwTaG1jWuVyS+4bkvO3Ngj2VFdvIky7meZnZQYUiLmXy7D+aKELVuO41BlyC3Un PsNB6Bqp67XwRV/KIdyZC1OSYTEAeRva+/mp8fKQu+bgpT1hjnTuNrgKvx3EU+0MJ34o zcJg== X-Gm-Message-State: AOAM53011mx0CVjQRRF3qn7/qZZs+OT/35/QYCkbQKUP3fAH7A4rTlhD b8CKQ0iFhmZEDv4QOUmDo7nLnRXbAFw= X-Google-Smtp-Source: ABdhPJwDBeSWIt6Hr3gWoXWPZ/pOwHRaMOjXY1/QHM2L3d1J2pLGZPWNEnskdl/7f8nZMB9tkjr+RA== X-Received: by 2002:a5d:5147:: with SMTP id u7mr6701419wrt.114.1611355398182; Fri, 22 Jan 2021 14:43:18 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id o14sm13335244wri.48.2021.01.22.14.43.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Jan 2021 14:43:17 -0800 (PST) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42e.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:263286 Archived-At: On 22.01.2021 17:09, Stefan Monnier wrote: >>> I think both having two calls (one for each line) >> I would like it to stop reindenting the previous line. > > "it" being `newline-and-indent` (when used together with > `electric-indent-mode`) or `electric-indent-mode` in general? The former. > For `electric-indent-mode` have you tried > (setq-default electric-indent-inhibit t) ? That would disable the effects of electric-indent-functions, and in particular, of ruby--electric-indent-p. But with your latest change, seems like I can bind `newline-and-indent` to RET and it will behave as expected.