* bug#14402: Imenu does not work any more on trunk
@ 2013-05-14 17:36 Angelo Graziosi
2013-05-14 19:30 ` Glenn Morris
0 siblings, 1 reply; 8+ messages in thread
From: Angelo Graziosi @ 2013-05-14 17:36 UTC (permalink / raw
To: 14402
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#14402: Imenu does not work any more on trunk
2013-05-14 17:36 bug#14402: Imenu does not work any more on trunk Angelo Graziosi
@ 2013-05-14 19:30 ` Glenn Morris
2013-05-14 20:21 ` Angelo Graziosi
0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2013-05-14 19:30 UTC (permalink / raw
To: Angelo Graziosi; +Cc: 14402
Angelo Graziosi wrote:
> ;; f90-mode
> (add-hook 'f90-mode-hook
> '(lambda()
> ;; Add index of func. to menu bar
> (imenu-add-to-menubar "Program-Units")
> )
> )
[...]
> Error in menu-bar-update-hook (imenu-update-menubar):
> (wrong-type-argument stringp ("Types" f90-imenu-type-matcher 1))
Fixed.
Any other modes, you will have to report the details.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#14402: Imenu does not work any more on trunk
2013-05-14 19:30 ` Glenn Morris
@ 2013-05-14 20:21 ` Angelo Graziosi
2013-05-14 21:49 ` Angelo Graziosi
0 siblings, 1 reply; 8+ messages in thread
From: Angelo Graziosi @ 2013-05-14 20:21 UTC (permalink / raw
To: Glenn Morris; +Cc: 14402
Ciao Glenn,
Il 14/05/2013 21.30, Glenn Morris ha scritto:
> Angelo Graziosi wrote:
>
>> ;; f90-mode
>> (add-hook 'f90-mode-hook
>> '(lambda()
>> ;; Add index of func. to menu bar
>> (imenu-add-to-menubar "Program-Units")
>> )
>> )
> [...]
>> Error in menu-bar-update-hook (imenu-update-menubar):
>> (wrong-type-argument stringp ("Types" f90-imenu-type-matcher 1))
>
> Fixed.
Many thanks for the quick fix... :-)
> Any other modes, you will have to report the details.
>
I can't reproduce the issue any more. I have tested with .f90, .f,
Makefile, .tex, .sh, C/C++. :)
Ciao,
Angelo.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#14402: Imenu does not work any more on trunk
2013-05-14 20:21 ` Angelo Graziosi
@ 2013-05-14 21:49 ` Angelo Graziosi
2013-05-14 22:06 ` Glenn Morris
0 siblings, 1 reply; 8+ messages in thread
From: Angelo Graziosi @ 2013-05-14 21:49 UTC (permalink / raw
To: Glenn Morris
Package: emacs
Glenn,
now I am seeing another issue and don't know if related to this fix.
In short, F90 mode seems to have lost the completion linked to "end".
More precisely,
$ emacs -Q &
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,
program foo
end
I need to type "end program<TAB>", to have the right behavior...
The same occurs with other statements, if-then, do..
Ciao,
Angelo.
Il 14/05/2013 22.21, Angelo Graziosi ha scritto:
> Ciao Glenn,
>
> Il 14/05/2013 21.30, Glenn Morris ha scritto:
>> Angelo Graziosi wrote:
>>
>>> ;; f90-mode
>>> (add-hook 'f90-mode-hook
>>> '(lambda()
>>> ;; Add index of func. to menu bar
>>> (imenu-add-to-menubar "Program-Units")
>>> )
>>> )
>> [...]
>>> Error in menu-bar-update-hook (imenu-update-menubar):
>>> (wrong-type-argument stringp ("Types" f90-imenu-type-matcher 1))
>>
>> Fixed.
>
> Many thanks for the quick fix... :-)
>
>> Any other modes, you will have to report the details.
>>
>
> I can't reproduce the issue any more. I have tested with .f90, .f,
> Makefile, .tex, .sh, C/C++. :)
>
>
> Ciao,
> Angelo.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#14402: Imenu does not work any more on trunk
2013-05-14 21:49 ` Angelo Graziosi
@ 2013-05-14 22:06 ` Glenn Morris
2013-05-14 22:35 ` Angelo Graziosi
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Glenn Morris @ 2013-05-14 22:06 UTC (permalink / raw
To: Angelo Graziosi; +Cc: 14402
(Please keep the debbugs address cc'd.)
Angelo Graziosi wrote:
> now I am seeing another issue and don't know if related to this fix.
>
> In short, F90 mode seems to have lost the completion linked to "end".
>
> More precisely,
>
> $ emacs -Q &
>
> 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,
This is all breakage from r112519.
Specifically, f90-looking-at-program-block-end is broken (and who knows
what else).
I don't feel like sorting through all this to figure it out.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#14402: Imenu does not work any more on trunk
2013-05-14 22:06 ` Glenn Morris
@ 2013-05-14 22:35 ` Angelo Graziosi
2013-05-14 22:39 ` Stefan Monnier
2013-05-15 0:53 ` Stefan Monnier
2 siblings, 0 replies; 8+ messages in thread
From: Angelo Graziosi @ 2013-05-14 22:35 UTC (permalink / raw
To: Glenn Morris; +Cc: 14402
Il 15/05/2013 0.06, Glenn Morris ha scritto:
>
> (Please keep the debbugs address cc'd.)
>
> Angelo Graziosi wrote:
>
>> now I am seeing another issue and don't know if related to this fix.
>>
>> In short, F90 mode seems to have lost the completion linked to "end".
>>
>> More precisely,
>>
>> $ emacs -Q &
>>
>> 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,
>
> This is all breakage from r112519.
> Specifically, f90-looking-at-program-block-end is broken (and who knows
> what else).
> I don't feel like sorting through all this to figure it out.
>
Just a curiosity... :) who did this?
f90-mode is practically unusable from point of view of completion...
In any case, thank for your time.
Ciao,
Angelo.
Oops... should we open a bug report?
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#14402: Imenu does not work any more on trunk
2013-05-14 22:06 ` Glenn Morris
2013-05-14 22:35 ` Angelo Graziosi
@ 2013-05-14 22:39 ` Stefan Monnier
2013-05-15 0:53 ` Stefan Monnier
2 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2013-05-14 22:39 UTC (permalink / raw
To: Glenn Morris; +Cc: 14402, Angelo Graziosi
>> $ emacs -Q &
>>
>> 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,
> This is all breakage from r112519.
> Specifically, f90-looking-at-program-block-end is broken (and who knows
> what else).
> I don't feel like sorting through all this to figure it out.
Thanks, I'll take a look,
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#14402: Imenu does not work any more on trunk
2013-05-14 22:06 ` Glenn Morris
2013-05-14 22:35 ` Angelo Graziosi
2013-05-14 22:39 ` Stefan Monnier
@ 2013-05-15 0:53 ` Stefan Monnier
2 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2013-05-15 0:53 UTC (permalink / raw
To: Glenn Morris; +Cc: 14402-done, Angelo Graziosi
>> 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 @@
\f
;; 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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-05-15 0:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-14 17:36 bug#14402: Imenu does not work any more on trunk Angelo Graziosi
2013-05-14 19:30 ` Glenn Morris
2013-05-14 20:21 ` Angelo Graziosi
2013-05-14 21:49 ` Angelo Graziosi
2013-05-14 22:06 ` Glenn Morris
2013-05-14 22:35 ` Angelo Graziosi
2013-05-14 22:39 ` Stefan Monnier
2013-05-15 0:53 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.