GNOME Bugzilla – Bug 510032
The code comment plugin does't work with Fortran 95
Last modified: 2008-01-17 17:30:56 UTC
Please describe the problem: The code comment plugin does't work with Fortran 95. The problem is in the method get_metadata('line-comment-start') from gtksourceview2.Language. This method returns None when the language is Fortran 95 and I think it should return ! (fortran line comment) Steps to reproduce: 1. Select lines of a Fortran 95 source file 2. Try to comment (Ctrl+M) 3. Actual results: Nothing happens Expected results: Comment the selected lines Does this happen every time? yes Other information:
Created attachment 103059 [details] [review] Apply this patch to allow code comment plugin work with Fortran 95 files This is a very ugly patch that provides a simple workaround to solve this problem.
Hello, If the bug is in a missing property in the gtksourceview lang file, you should definately fix the lang file, and not add a workaround for that in the plugin. What you have to do is to add a line-comment-start property to fortran.lang. Take a look in c.lang or python.lang (for instance) to have an example. The lang file is from gtksourceview and is in /usr/share/gtksourceview-2.0/language-specs. If you could provide a patch against the svn version of gsv we'd be glad to apply it straight away.
Created attachment 103064 [details] [review] This is the patch to fix the problem properly. This is the patch to fix the problem properly adding the line <property name="line-comment-start">!</property> in /usr/share/gtksourceview-2.0/language-specs/fortran.lang
2008-01-17 Yevgen Muntyan <muntyan@tamu.edu> * gtksourceview/language-specs/fortran.lang: added comment property, patch by rsachetto@gmail.com (#510032). * gtksourceview/language-specs/docbook.lang: removed obsolete dtd line.