GNU bug report logs - #20680
f90.el --- indent-region errors

Previous Next

Package: emacs;

Reported by: Joris Picot <jpicot <at> enscbp.fr>

Date: Thu, 28 May 2015 06:09:02 UTC

Severity: normal

Merged with 20969

Fixed in version 25.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20680 in the body.
You can then email your comments to 20680 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to help-debbugs <at> gnu.org:
bug#20680; Package debbugs.gnu.org. (Thu, 28 May 2015 06:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joris Picot <jpicot <at> enscbp.fr>:
New bug report received and forwarded. Copy sent to help-debbugs <at> gnu.org. (Thu, 28 May 2015 06:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Joris Picot <jpicot <at> enscbp.fr>
To: <rgm <at> gnu.org>
Cc: antoine.lemoine <at> ipb.fr
Subject: f90.el --- indent-region errors
Date: Wed, 27 May 2015 14:11:50 +0200
[Message part 1 (text/plain, inline)]
Hi,

I have trouble running M-x indent-region in whole Fortran programs with
some Fortran 2003 features such as the module enclosed with this mail.

I get the messages:

    END enum does not match module.
    END type does not match program.
    END module does not match program.

and my code is not indented correctly. I looked in the f90.el script,
but I can't get it to work.

Are you familiar with this problem? Do you have any workaround?


Best Regards,

-- 
Joris Picot
I2M – Trèfle
[my_module.f90 (text/x-fortran, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20680; Package emacs. (Thu, 28 May 2015 06:15:04 GMT) Full text and rfc822 format available.

Message #8 received at 20680 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Joris Picot <jpicot <at> enscbp.fr>
Cc: antoine.lemoine <at> ipb.fr, 20680 <at> debbugs.gnu.org
Subject: Re: bug#20680: f90.el --- indent-region errors
Date: Thu, 28 May 2015 02:14:45 -0400
Joris Picot wrote:

> I have trouble running M-x indent-region in whole Fortran programs with
> some Fortran 2003 features such as the module enclosed with this mail.

Thanks for the report, but please report bugs to bug-gnu-emacs <at> gnu.org
(preferably using M-x report-emacs-bug), rather than directly to me (or
anyone else whose name happens to be in a file header).

Anyway, I think this fixes it:

--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -900,9 +900,11 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
   ;; type :: word
   ;; type, stuff :: word
   ;; type, bind(c) :: word
+  ;; type, extends(stuff) :: word
   ;; NOT "type ("
   "\\_<\\(type\\)\\_>\\(?:\\(?:[^()\n]*\\|\
-.*,[ \t]*bind[ \t]*([ \t]*c[ \t]*)[ \t]*\\)::\\)?[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)"
+.*,[ \t]*\\(?:bind\\|extends\\)[ \t]*(.*)[ \t]*\\)::\\)?\
+[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)"
   "Regexp matching the definition of a derived type.")
 
 (defconst f90-typeis-re
@@ -1450,7 +1452,7 @@ if all else fails."
     (not (or (looking-at "end")
              (looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\
 \\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\|\
-block\\|critical\\)\\_>")
+block\\|critical\\|enum\\)\\_>")
              (looking-at "\\(program\\|\\(?:sub\\)?module\\|\
 \\(?:abstract[ \t]*\\)?interface\\|block[ \t]*data\\)\\_>")
              (looking-at "\\(contains\\|\\(?:\\sw\\|\\s_\\)+[ \t]*:\\)")




bug marked as fixed in version 25.1, send any further explanations to 20680 <at> debbugs.gnu.org and Joris Picot <jpicot <at> enscbp.fr> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 28 May 2015 06:15:06 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 25 Jun 2015 11:24:05 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 02 Jul 2015 23:06:02 GMT) Full text and rfc822 format available.

Forcibly Merged 20680 20969. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 02 Jul 2015 23:06:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 03 Aug 2015 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.