From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#17895: 24.3.91; electric-indent-mode not quite right with comments in fortran-mode Date: Tue, 01 Jul 2014 19:49:30 -0400 Message-ID: References: <87vbrgahqp.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1404258618 10214 80.91.229.3 (1 Jul 2014 23:50:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Jul 2014 23:50:18 +0000 (UTC) Cc: Roland Winkler , 17895@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 02 01:50:10 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 1X27oO-0007av-9D for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Jul 2014 01:50:08 +0200 Original-Received: from localhost ([::1]:50390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X27oN-0001DX-O0 for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Jul 2014 19:50:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X27oJ-0001CL-VN for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2014 19:50:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X27oI-0007yV-SU for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2014 19:50:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X27oI-0007yG-OY for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2014 19:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X27oH-0003Qx-Sm for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2014 19:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Jul 2014 23:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17895 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17895-submit@debbugs.gnu.org id=B17895.140425857313154 (code B ref 17895); Tue, 01 Jul 2014 23:50:01 +0000 Original-Received: (at 17895) by debbugs.gnu.org; 1 Jul 2014 23:49:33 +0000 Original-Received: from localhost ([127.0.0.1]:39684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X27np-0003Q6-6S for submit@debbugs.gnu.org; Tue, 01 Jul 2014 19:49:33 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:55211 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X27nn-0003Pw-Bo for 17895@debbugs.gnu.org; Tue, 01 Jul 2014 19:49:32 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1X27nm-0007aP-7n; Tue, 01 Jul 2014 19:49:30 -0400 X-Spook: domestic disruption eavesdropping CID rail gun CIDA lock X-Ran: pM3"wzBj7I`n7qu:FCn>\Kyf+\e}^%o<&o$]G`?SW6Z:%m[,gV*M (Stefan Monnier's message of "Tue, 01 Jul 2014 18:47:33 -0400") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) 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:91070 Archived-At: Stefan Monnier wrote: > [ Don't know enough about Fortran to know what is "insert a multiline > comment" in this context AFAIK, there is no such thing as "multiline comments" in Fortran. I assume he means he has typed: C this is a comment Then he presses RET and wants to write more comments, but point gets indented to column 6 instead. It's impossible for Fortran mode to know if he was going to write code (column 6) or a comment (column 0). I could say the same thing about pressing RET after a code line. > neither do I know what is a "multiline statement" or why it would > "require fortran-continuation-string" If you want to write a continued code line, you put eg a "$" in column 5 of the new line. There's no marker in the previous line, so again it is impossible for Fortran mode to know that's what you intend when you press RET. > Maybe a way to fix this problem, then, would be to make fortran's > indent-line-function indent to column 0 when called on an empty line in > one of those contexts. It is impossible for it to know, as I hopefully explain above. I really don't think that Fortran mode can do anything here. The new behavior is different to the old one, but I think it will be a net win in terms of fewer keypresses in most situations. (Everyone should use free-format Fortran, where these problems were all solved 20+ years ago!)