GNU bug report logs -
#345
Bug in F90 mode
Previous Next
Reported by: Gabor Toth <GTOTH <at> UMICH.EDU>
Date: Sun, 1 Jun 2008 14:05:05 UTC
Severity: normal
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 345 in the body.
You can then email your comments to 345 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#345
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Gabor Toth <GTOTH <at> UMICH.EDU>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Dear GNU emacs developers,
I truly appreciate the work put into the emacs editor. This is the
editor of choice for editing source code files because of the many
advanced features that help programmers. I have been using the F90
module for a long time and I encountered a small but annoying bug. I
tried to work around it, but I could not.
The bug is present in every version of emacs I know of. It is a bug
in the F90 module. To reproduced the bug, simply create a file
with .f90 extension, say
bug.f90
open the file, and type the following lines
program bug
AnyVariable = 1.0
TypeVariable = 2.0
OtherVariable = 3.0
end program bug
and let Emacs indent it (by hitting TAB at the beginning of each
line). The result is what you see above, ie the lines following the
TypeVariable = 2.0 line are indented.
The reason is that if a line starts withTypeXXX the F90 module
regards it as a type definition, although it is not matched when an
end statement is typed. I suspect that the error is in the definition
of f90-type-def-re in the f90.el file. The definition is
(defconst f90-type-def-re
"\\<\\(type\\)\\([^(\n]*\\)\\(::\\)?[ \t]*\\b\\(\\sw+\\)")
It seems that this regular expression is too permissive. The [^(\n]**
part matches anything that follows the "type" string except for
opening paren and end-of-line. This should probably be replaced with
[ \t]*
I would be greatful if you could suggest a work around that I can put
into my .emacs file. My attempts at redefining the f90-type-def-re
did not work. I managed to set the indentation to 0 for type/
interface/blockdata definitions to avoid this problem, but then the
true type and interface definitions will not be indented, and that's
pretty ugly. We have some huge F90 codes, and not allowing variables
to start with the string "type" is not an option.
Thanks for your work and kind help,
Gabor Toth
Research scientist
University of Michigan
Reply sent to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
Full text and
rfc822 format available.
Notification sent to
Gabor Toth <GTOTH <at> UMICH.EDU>
:
bug acknowledged by developer.
Full text and
rfc822 format available.
Message #10 received at 345-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Gabor Toth wrote:
> The bug is present in every version of emacs I know of.
I can't reproduce it in Emacs 21.4, 22.1 or 22.2.
(The CVS trunk does have a separate problem here; funny coincidence.)
> (defconst f90-type-def-re
> "\\<\\(type\\)\\([^(\n]*\\)\\(::\\)?[ \t]*\\b\\(\\sw+\\)")
This form was replaced 6 years ago, ie in Emacs 21.3.
I strongly advise you to use a more recent version of Emacs (the
latest is 22.2), where we have the equivalent of:
(setq f90-type-def-re "\\<\\(type\\)\\>\\(?:[^()\n]*::\\)?[ \t]*\\(\\sw+\\)")
bug archived.
Request was from
Debbugs Internal Request <don <at> donarmstrong.com>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Tue, 01 Jul 2008 14:24:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 355 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.