aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/f90.el8
-rw-r--r--test/automated/f90.el26
2 files changed, 30 insertions, 4 deletions
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 2bd7e7cc884..43b057ba882 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -898,12 +898,12 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
898(defconst f90-type-def-re 898(defconst f90-type-def-re
899 ;; type word 899 ;; type word
900 ;; type :: word 900 ;; type :: word
901 ;; type, stuff :: word 901 ;; type, attr-list :: word
902 ;; type, bind(c) :: word 902 ;; where attr-list = attr [, attr ...]
903 ;; type, extends(stuff) :: word 903 ;; and attr may include bind(c) or extends(thing)
904 ;; NOT "type (" 904 ;; NOT "type ("
905 "\\_<\\(type\\)\\_>\\(?:\\(?:[^()\n]*\\|\ 905 "\\_<\\(type\\)\\_>\\(?:\\(?:[^()\n]*\\|\
906.*,[ \t]*\\(?:bind\\|extends\\)[ \t]*(.*)[ \t]*\\)::\\)?\ 906.*,[ \t]*\\(?:bind\\|extends\\)[ \t]*(.*).*\\)::\\)?\
907[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)" 907[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)"
908 "Regexp matching the definition of a derived type.") 908 "Regexp matching the definition of a derived type.")
909 909
diff --git a/test/automated/f90.el b/test/automated/f90.el
index 4c1abc34c47..c521d289a5d 100644
--- a/test/automated/f90.el
+++ b/test/automated/f90.el
@@ -214,4 +214,30 @@ end module modname")
214 (forward-line -1) 214 (forward-line -1)
215 (should (= 2 (current-indentation))))) 215 (should (= 2 (current-indentation)))))
216 216
217(ert-deftest f90-test-bug20969 ()
218 "Test for http://debbugs.gnu.org/20969 ."
219 (with-temp-buffer
220 (f90-mode)
221 (insert "module modname
222type, extends ( sometype ), private :: type1
223integer :: part1
224end type type1
225end module modname")
226 (f90-indent-subprogram)
227 (forward-line -1)
228 (should (= 2 (current-indentation)))))
229
230(ert-deftest f90-test-bug20969b ()
231 "Test for http://debbugs.gnu.org/20969 ."
232 (with-temp-buffer
233 (f90-mode)
234 (insert "module modname
235type, private, extends ( sometype ) :: type1
236integer :: part1
237end type type1
238end module modname")
239 (f90-indent-subprogram)
240 (forward-line -1)
241 (should (= 2 (current-indentation)))))
242
217;;; f90.el ends here 243;;; f90.el ends here