emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#14402: closed (f90-mode broken in multiple ways by


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#14402: closed (f90-mode broken in multiple ways by trunk r112519)
Date: Wed, 15 May 2013 00:54:02 +0000

Your message dated Tue, 14 May 2013 20:53:20 -0400
with message-id <address@hidden>
and subject line Re: bug#14402: Imenu does not work any more on trunk
has caused the debbugs.gnu.org bug report #14402,
regarding f90-mode broken in multiple ways by trunk r112519
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
14402: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14402
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Imenu does not work any more on trunk Date: Tue, 14 May 2013 19:36:37 +0200 User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 The trunk revision #112579 shows an issue *very* similar to that described in bug #9199 [*]: same way to reproduce it, same result.

In my ~/.emacs.d/init.el I have something like this:

;; c-mode
(add-hook 'c-mode-hook
          '(lambda()
             ;; No indent for open bracket
             (c-set-offset 'substatement-open 0)

             ;; Add index of func. to menu bar
             (imenu-add-to-menubar "Functions")
             )
          )

[...]

;; f90-mode
(add-hook 'f90-mode-hook
          '(lambda()
             ;; Add index of func. to menu bar
             (imenu-add-to-menubar "Program-Units")
             )
          )

[...]

(setq imenu-auto-rescan t)
(setq imenu-auto-rescan-maxout 500000)

[...]

This time the issue shows up also in other programming modes. The Emacs buffer displays this error message:

Error in menu-bar-update-hook (imenu-update-menubar): (wrong-type-argument stringp ("Types" f90-imenu-type-matcher 1))

This issue is not shown by rev. 112494 I have build on May 07, 2013.


Ciao,
  Angelo.


---
[*] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9199



--- End Message ---
--- Begin Message --- Subject: Re: bug#14402: Imenu does not work any more on trunk Date: Tue, 14 May 2013 20:53:20 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
>> 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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]