diff options
author | Glenn Morris <rgm@gnu.org> | 2020-01-15 18:47:51 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2020-01-15 18:47:51 -0800 |
commit | 3b0d1a50aa7e7555d46c6a6b54840c9fb46a6810 (patch) | |
tree | 0725354aa64e2c52abb8839a8d6a6f32914e34bd /test/lisp/progmodes/f90-tests.el | |
parent | 55803cc189a89031bbf2b37e5ac00a04ef1ad8aa (diff) | |
download | emacs-3b0d1a50aa7e7555d46c6a6b54840c9fb46a6810.tar.gz |
f90: handle F2008 module function
* lisp/progmodes/f90.el (f90-font-lock-keywords-1)
(f90-looking-at-program-block-start):
Handle F2008 "module function" and subroutine. (Bug#38415)
* test/lisp/progmodes/f90-tests.el (f90-test-bug38415): New test.
Diffstat (limited to 'test/lisp/progmodes/f90-tests.el')
-rw-r--r-- | test/lisp/progmodes/f90-tests.el | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/lisp/progmodes/f90-tests.el b/test/lisp/progmodes/f90-tests.el index 540082c7174..b6fbac351dc 100644 --- a/test/lisp/progmodes/f90-tests.el +++ b/test/lisp/progmodes/f90-tests.el @@ -277,4 +277,24 @@ end program prog") (forward-line -2) (should (= 2 (current-indentation))))) ; type is +(ert-deftest f90-test-bug38415 () + "Test for https://debbugs.gnu.org/38415 ." + (with-temp-buffer + (f90-mode) + (setq-local f90-smart-end 'no-blink) + (insert "module function foo(x) +real :: x +end") + (f90-indent-line) + (should (equal " function foo" + (buffer-substring (point) (line-end-position)))) + (goto-char (point-max)) + (insert "\nmodule subroutine bar(x) +real :: x +end") + (f90-indent-line) + (should (equal " subroutine bar" + (buffer-substring (point) (line-end-position)))))) + + ;;; f90-tests.el ends here |