GNU bug report logs - #14402
f90-mode broken in multiple ways by trunk r112519

Previous Next

Package: emacs;

Reported by: Angelo Graziosi <angelo.graziosi <at> alice.it>

Date: Tue, 14 May 2013 17:38:01 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #34 received at 14402-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 14402-done <at> debbugs.gnu.org, Angelo Graziosi <angelo.graziosi <at> alice.it>
Subject: Re: bug#14402: Imenu does not work any more on trunk
Date: Tue, 14 May 2013 20:53:20 -0400
>> C-x C-f foo.f90 RET
>> program foo
>> end<TAB>
>> it should complete in "end program foo" instead it stays to "end".
>> "end" is only indented,

I just installed the patch below which seems to fix this.

> This is all breakage from r112519.
> Specifically, f90-looking-at-program-block-end is broken (and who knows
> what else).

Interestingly, the bug was caused by the fact that the old code relied
on a bug in the handling of the \> regexp: more specifically \> treated
(string-match "ab\\>?" foo) as (string-match "a\\(?:b\\>\\)?" foo)
instead of the expected (string-match "ab\\(?:\\>\\)?" foo).


        Stefan


=== modified file 'lisp/progmodes/f90.el'
--- lisp/progmodes/f90.el	2013-05-14 19:29:35 +0000
+++ lisp/progmodes/f90.el	2013-05-15 00:40:06 +0000
@@ -842,14 +842,14 @@
 
 ;; Regexps for finding program structures.
 (defconst f90-blocks-re
-  (concat "\\(block[ \t]*data\\|"
+  (concat "\\(\\(?:block[ \t]*data\\|"
           (regexp-opt '("do" "if" "interface" "function" "module" "program"
                         "select" "subroutine" "type" "where" "forall"
                         ;; F2003.
                         "enum" "associate"
                         ;; F2008.
                         "submodule" "block" "critical"))
-          "\\)\\_>")
+          "\\)\\_>\\)")
   "Regexp potentially indicating a \"block\" of F90 code.")
 
 (defconst f90-program-block-re




This bug report was last modified 12 years and 68 days ago.

Previous Next


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