From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#12413: 24.2.50; M-j should be bound to default-indent-new-line Date: Wed, 24 Feb 2016 17:11:35 +1100 Message-ID: <87povmd4dk.fsf@gnus.org> References: <504F05EA.6000703@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456294403 29379 80.91.229.3 (24 Feb 2016 06:13:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Feb 2016 06:13:23 +0000 (UTC) Cc: 12413@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 24 07:13:11 2016 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 1aYShC-0008PR-RJ for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Feb 2016 07:13:11 +0100 Original-Received: from localhost ([::1]:33782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYShC-0006Ep-8B for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Feb 2016 01:13:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYSh8-0006Eg-17 for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2016 01:13:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYSh3-0000ob-W5 for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2016 01:13:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYSh3-0000oW-T2 for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2016 01:13:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aYSh3-0008Qj-Pm for bug-gnu-emacs@gnu.org; Wed, 24 Feb 2016 01:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Feb 2016 06:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12413 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 12413-submit@debbugs.gnu.org id=B12413.145629432332341 (code B ref 12413); Wed, 24 Feb 2016 06:13:01 +0000 Original-Received: (at 12413) by debbugs.gnu.org; 24 Feb 2016 06:12:03 +0000 Original-Received: from localhost ([127.0.0.1]:42324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYSg7-0008PZ-B7 for submit@debbugs.gnu.org; Wed, 24 Feb 2016 01:12:03 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:47577) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYSg6-0008PL-4K for 12413@debbugs.gnu.org; Wed, 24 Feb 2016 01:12:02 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aYSfj-0002n3-1F; Wed, 24 Feb 2016 07:11:39 +0100 In-Reply-To: <504F05EA.6000703@yandex.ru> (Dmitry Gutov's message of "Tue, 11 Sep 2012 13:35:38 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aYSfj-0002n3-1F MailScanner-NULL-Check: 1456899100.44554@oGBxSe0eNYKBgS25Z0K8NQ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:113679 Archived-At: Dmitry Gutov writes: > A major mode can change the value of comment-line-break-function, but > currently it's only used from `do-auto-fill'. I think that doesn't make > sense, the value should affect the M-j command, too. > > default-indent-new-line does pretty much that. The function could use a > better name, though - it isn't used in any variables as default value. [...] I think this makes sense, but it wasn't applied at the time (three years ago). Is this still an issue? > (define-key esc-map ";" 'comment-dwim) > -(define-key esc-map "j" 'indent-new-comment-line) > -(define-key esc-map "\C-j" 'indent-new-comment-line) > +(define-key esc-map "j" 'default-indent-new-line) > +(define-key esc-map "\C-j" 'default-indent-new-line) > (define-key ctl-x-map ";" 'comment-set-column) > (define-key ctl-x-map "f" 'set-fill-column) > (define-key ctl-x-map "$" 'set-selective-display) > > === modified file 'lisp/simple.el' > --- lisp/simple.el 2012-09-07 08:58:31 +0000 > +++ lisp/simple.el 2012-09-11 06:34:40 +0000 > @@ -5501,7 +5501,7 @@ > > (defun default-indent-new-line (&optional soft) > "Break line at point and indent. > -If a comment syntax is defined, call `comment-indent-new-line'. > +If a comment syntax is defined, call `comment-line-break-function'. > > The inserted newline is marked hard if variable `use-hard-newlines' is true, > unless optional argument SOFT is non-nil." > > === modified file 'lisp/textmodes/refill.el' > --- lisp/textmodes/refill.el 2012-07-11 23:13:41 +0000 > +++ lisp/textmodes/refill.el 2012-09-11 06:50:28 +0000 > @@ -179,7 +179,7 @@ > (refill-fill-paragraph-at refill-doit) > (setq refill-doit nil))) > ((or `quoted-insert `fill-paragraph `fill-region) nil) > - ((or `newline `newline-and-indent `open-line `indent-new-comment-line > + ((or `newline `newline-and-indent `open-line `default-indent-new-line > `reindent-then-newline-and-indent) > ;; Don't zap what was just inserted. > (save-excursion > -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no