From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#17128: 24.3.50; `newline-and-indent' should not indent the current line Date: Tue, 01 Apr 2014 08:37:44 +0300 Message-ID: <533A50A8.8010909@yandex.ru> References: <87k3beetjb.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1396330709 5248 80.91.229.3 (1 Apr 2014 05:38:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Apr 2014 05:38:29 +0000 (UTC) Cc: 17128@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 01 07:38:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WUrOw-0006vu-Go for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Apr 2014 07:38:22 +0200 Original-Received: from localhost ([::1]:52611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUrOv-0000ab-Oj for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Apr 2014 01:38:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUrOl-0000aR-C2 for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 01:38:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUrOd-0000we-9I for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 01:38:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUrOd-0000wa-5Q for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 01:38:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WUrOc-0005e7-EM for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2014 01:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Apr 2014 05:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17128 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 17128-submit@debbugs.gnu.org id=B17128.139633067621688 (code B ref 17128); Tue, 01 Apr 2014 05:38:02 +0000 Original-Received: (at 17128) by debbugs.gnu.org; 1 Apr 2014 05:37:56 +0000 Original-Received: from localhost ([127.0.0.1]:58559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WUrOV-0005dj-Ht for submit@debbugs.gnu.org; Tue, 01 Apr 2014 01:37:55 -0400 Original-Received: from mail-wg0-f52.google.com ([74.125.82.52]:65224) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WUrOT-0005dd-TC for 17128@debbugs.gnu.org; Tue, 01 Apr 2014 01:37:54 -0400 Original-Received: by mail-wg0-f52.google.com with SMTP id k14so6911935wgh.35 for <17128@debbugs.gnu.org>; Mon, 31 Mar 2014 22:37:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=uv94SH5bVHRdjYYgrqFYj2PAjDwLpBJBMiipyWQDLbg=; b=ApEjUqT6NrLR7LVba4ep0wq72jVpPTQRZ39fNauBXGBHmlvU2fySs4Qb8surwY9GON OflRg51FrG7LprHB8I1gYlNpCNQya60/6uKy32HW9BFeNXdKhu4lyHmMBYCoQX7AlOc8 RX5E0EROi/RD44QcXUN7axBpmJEynXucDkh9AVCHoAygXW8IecZz1jOsKdPPdacgPZn2 t/jjGHyo7SJdioYME38eM/XjIFpWJCRscqNdRLm7JZ6FPa3/Ce/fP83lZ1ao40w4lJK+ Nn/uzXsxYv6LoP9je9KL88FSuSLKsJU7eVoSYmGHTTwaiFpy2p+dVU0mom8501r+h482 uHNw== X-Received: by 10.194.24.74 with SMTP id s10mr17948065wjf.43.1396330672884; Mon, 31 Mar 2014 22:37:52 -0700 (PDT) Original-Received: from [192.168.10.2] (93-20-136.netrun.cytanet.com.cy. [93.109.20.136]) by mx.google.com with ESMTPSA id z48sm37949053eel.27.2014.03.31.22.37.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 31 Mar 2014 22:37:51 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:87586 Archived-At: On 28.03.2014 16:17, Stefan Monnier wrote: >> There's `reindent-then-newline-and-indent' for that. > > Agreed. Hmm, I'm not sure about the patch, though. If `newline-and-indent' shouldn't reindent the current line [even when electric-indent-mode is enabled] because there's `reindent-then-newline-and-indent', then `newline' likewise probably shouldn't (re)indent either of the lines because of the existence of the former two functions. In that case, my suggestion to separate the electric indent on RET from indenting after newline wouldn't exactly work. Could we define new commands in electric-mode, and bind them when it's on? Something like `electric-maybe-indent-then-newline' and `electric-maybe-reindent-then-newline-and-indent'.