Hot answers tagged

2

fortran-mode-hook only runs for buffers that end up in fortran-mode. To affect which extensions are recognized as fortran, you can modify auto-mode-alist, eg (add-to-list 'auto-mode-alist '("\\.f9[50]" . fortran-mode))


2

The simple solution: Use ctags -e instead of etags (assuming "Exuberant Ctags"[1]) While man ctags explicitly says that etags is preferred for use with emacs, ctags seems to have much better fortran support. I now use: ctags -e --recurse # : : # : `- Recursive processing of subdirectories. # : Apparently also filters by ...


2

Yes, what you want is a "hungry" or "greedy" delete/backspace. f90-mode doesn't come with such a thing, but cc-mode does. It includes two inter-related families of functions c-electric-delete* and c-hungry-delete-*. Specifically take a look at c-hungry-delete-backwards via Emacs's built in function help (C-h f c-hungry-delete-backwards). ...


1

With the default gfortran checker options, it seems checking stops after the first error. You could try options that issue warnings that would otherwise be errors: (setq flycheck-gfortran-language-standard "gnu") (add-to-list 'flycheck-gfortran-warnings "pedantic")


1

Make sure fortran-gfortran is in your exec-path. (You can check your exec-path with C-h v exec-path.) Or, explicitly set somewhere in your init flycheck-fortran-gfortran-executable to point to the executable.


1

ctags supports regular expression which could be used to parse tags. Add below code into ~/.ctags, --regex-fortran=/^[ \t]*MODULE[ \t]+(PROCEDURE|SUBROUTINE)[ \t]+([a-zA-Z0-9_]+)/\2/s,subroutines/ hello.f is like, MODULE PROCEDURE MySubroutineName1 ! or MODULE SUBROUTINE MySubRoutineName2 Then run ctags -e hello.f to test. See https://duckduckgo.com/?...


Only top voted, non community-wiki answers of a minimum length are eligible